I want to print data from XML in readable formate which is the last section of XML file .My code writes data from database to XML file .
Here is a code i use to write XML
Note: myread is a dll containing dataset,data adapter and connection string.
ds As New DataSet
da As New FbDataAdapter
myRead.myfill("SELECT CODE,DES FROM TB_TEAM a ORDER BY CODE")
myRead.ds = New DataSet
myRead.da.Fill(myRead.ds, "a")
myRead.ds.WriteXml("C:\Accountant.xml", XmlWriteMode.WriteSchema)
The xml comes in a formate like
<?xml version="1.0" standalone="true"?>
-<NewDataSet>
-<xs:schema xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="" id="NewDataSet">
-<xs:element msdata:UseCurrentLocale="true" msdata:IsDataSet="true" name="NewDataSet">
-<xs:complexType>
-<xs:choice maxOccurs="unbounded" minOccurs="0">
-<xs:element name="a">
-<xs:complexType>
-<xs:sequence>
<xs:element name="VNO" minOccurs="0" type="xs:decimal"/>
<xs:element name="VDATE" minOccurs="0" type="xs:dateTime"/>
<xs:element name="CODE" minOccurs="0" type="xs:string"/>
<xs:element name="SUBHEADOFACCOUNT" minOccurs="0" type="xs:string"/>
<xs:element name="CREDIT" minOccurs="0" type="xs:decimal"/>
<xs:element name="DES" minOccurs="0" type="xs:string"/>
<xs:element name="OCODE" minOccurs="0" type="xs:string"/>
<xs:element name="ODES" minOccurs="0" type="xs:string"/>
<xs:element name="TRID" minOccurs="0" type="xs:decimal"/>
<xs:element name="UID" minOccurs="0" type="xs:string"/>
<xs:element name="ROOM" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
-<a>
<VNO>1</VNO>
<VDATE>2014-01-10T00:00:00+05:00</VDATE>
<CODE>1020010001</CODE>
<SUBHEADOFACCOUNT>Hafiz Ateeq</SUBHEADOFACCOUNT>
<CREDIT>88</CREDIT>
<DES>seram electrolytes</DES>
<OCODE>1020030003</OCODE>
<ODES>Reception Cash</ODES>
<TRID>1</TRID>
<UID>SALAHUDDIN</UID>
<ROOM>8008</ROOM>
</a>
</NewDataSet>
I want to print the last output section which is
<a>
<VNO>1</VNO>
<VDATE>2014-01-10T00:00:00+05:00</VDATE>
<CODE>1020010001</CODE>
<SUBHEADOFACCOUNT>Hafiz Ateeq</SUBHEADOFACCOUNT>
<CREDIT>88</CREDIT>
<DES>seram electrolytes</DES>
<OCODE>1020030003</OCODE>
<ODES>Reception Cash</ODES>
<TRID>1</TRID>
<UID>SALAHUDDIN</UID>
<ROOM>8008</ROOM>
</a>
How to print this data in a readable format?