Following an example from a book, have just created an XML file from a VB recordset using the following command:-
MyRecordSet.Save "C:\MyFile.XML", adPersistXML
The XML file can be opened with notepad.
The book says 'Dont be alarmed at how different it looks from the XML files you have seen until now'.
The problem is that although I can load this XML file into a browser or Excel, it does look VERY different to the XML examples I have encountered.
Can anybody exlain why it is so different to the standard XML that the books use to teach? Is it a Microsoft thing?
I've noticed the same thing happens if I save from an Excel sheet. A format of XML is created that looks very different to the type I have encountered in my self teaching to date.
<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly'>
<s:AttributeType name='ID' rs:number='1'
rs:maydefer='true' rs:writeunknown='true'>
<s:datatype dt:type='int' dt:maxLength='4'
rs
recision='10' rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='strName' rs:number='2'
rs:nullable='true' rs:maydefer='true'
rs:writeunknown='true'>
<s:datatype dt:type='string'
dt:maxLength='50'/>
</s:AttributeType>
<s:AttributeType name='lngNumber'
rs:number='3' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
<s:datatype dt:type='int' dt:maxLength='4'
rs
recision='10' rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='strType' rs:number='4'
rs:nullable='true' rs:maydefer='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='1'/>
</s:AttributeType>
<s:extends type='rs:rowbase'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row ID='4' strName='Alpha' lngNumber='17'
strType='1'/>
<z:row ID='6' strName='Beta' lngNumber='12'
strType='2'/>
<z:row ID='7' strName='Tom' lngNumber='11'
strType='1'/>
<z:row ID='8' strName='Arthur' lngNumber='9'
strType='3'/>
<z:row ID='9' strName='Susan' lngNumber='10'
strType='1'/>
<z:row ID='10' strName='Jilly' lngNumber='12'
strType='2'/>
<z:row ID='11' strName='wendydgdfg' lngNumber='13'
strType='4'/>
<z:row ID='12' strName='Harrison' lngNumber='14'
strType='1'/>
</rs:data>
</xml>
Dazed and confused
MyRecordSet.Save "C:\MyFile.XML", adPersistXML
The XML file can be opened with notepad.
The book says 'Dont be alarmed at how different it looks from the XML files you have seen until now'.
The problem is that although I can load this XML file into a browser or Excel, it does look VERY different to the XML examples I have encountered.
Can anybody exlain why it is so different to the standard XML that the books use to teach? Is it a Microsoft thing?
I've noticed the same thing happens if I save from an Excel sheet. A format of XML is created that looks very different to the type I have encountered in my self teaching to date.
<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly'>
<s:AttributeType name='ID' rs:number='1'
rs:maydefer='true' rs:writeunknown='true'>
<s:datatype dt:type='int' dt:maxLength='4'
rs

</s:AttributeType>
<s:AttributeType name='strName' rs:number='2'
rs:nullable='true' rs:maydefer='true'
rs:writeunknown='true'>
<s:datatype dt:type='string'
dt:maxLength='50'/>
</s:AttributeType>
<s:AttributeType name='lngNumber'
rs:number='3' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
<s:datatype dt:type='int' dt:maxLength='4'
rs

</s:AttributeType>
<s:AttributeType name='strType' rs:number='4'
rs:nullable='true' rs:maydefer='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='1'/>
</s:AttributeType>
<s:extends type='rs:rowbase'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row ID='4' strName='Alpha' lngNumber='17'
strType='1'/>
<z:row ID='6' strName='Beta' lngNumber='12'
strType='2'/>
<z:row ID='7' strName='Tom' lngNumber='11'
strType='1'/>
<z:row ID='8' strName='Arthur' lngNumber='9'
strType='3'/>
<z:row ID='9' strName='Susan' lngNumber='10'
strType='1'/>
<z:row ID='10' strName='Jilly' lngNumber='12'
strType='2'/>
<z:row ID='11' strName='wendydgdfg' lngNumber='13'
strType='4'/>
<z:row ID='12' strName='Harrison' lngNumber='14'
strType='1'/>
</rs:data>
</xml>
Dazed and confused