ADO.Recordset XML scheme how to turn attribute to element question!!

ADO.Recordset XML scheme how to turn attribute to element question!!

Post by Wil » Fri, 28 Feb 2003 07:13:42



I am fairly new to XML. I need to load an XML file into an
ADO.Recordset

I have a following recordset with one column named "ERROR"
I am inserting lets say the value "helloworld" into it as a row.
The data comes in XML in this format.
<ERROR>helloworld</ERROR>

According to the adPersistXML dump RowsetSchema <z:row> is an element
and the values for the columns are specified as Attributes as
following:

<s:ElementType name="row" content="eltOnly" rs:updatable="true">
  <s:AttributeType name="ERROR" rs:number="1" rs:write="true">
    <s:datatype dt:type="string"/>
  </s:AttributeType>
</s:ElementType>

so the entering the data into the recordset would look like this
<z:row ERROR="helloworld"/>

where the value of each recordset column an <s:AttributeType>

unfortunately my data comes in like this

<ERROR>helloworld</ERROR>

which is an element.

How can I change the schema so the ADO.Recordset will accept it as
such:

<z:row>
  <ERROR>helloworld</ERROR>
</z:row>

Any Ideas?
Any help would be greatly appreciated.
 -- Will