How can we define more than one table,define columns and write data in xml file ?
Posted
by Harikrishna
on Stack Overflow
See other posts from Stack Overflow
or by Harikrishna
Published on 2010-04-13T10:44:53Z
Indexed on
2010/04/13
12:03 UTC
Read the original article
Hit count: 357
I am writing my xml file manually. And I am writing that for storing data and retrieving data from that.
I have written file like for the table PersonalInfo.
<?xml version="1.0" standalone="yes"?>
<PersonalInfo>
<xs:schema id="PersonalInfo" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="PersonalInfo" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="PesonalInfo.">
<xs:complexType>
<xs:sequence>
<!--Define Column Here....-->
<xs:element name="name" type="xs:string" />
<xs:element name="address" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<!--First Row-->
<PersonalInfo.>
<name>Harikrishna</name>
<address>India</address>
</PersonalInfo.>
<!--Second Row-->
<PersonalInfo.>
<name>Jatin</name>
<address>India</address>
</PersonalInfo.>
</PersonalInfo>
Please suggest any mistake with writing file here. And now I want define more than table in this file.
And here I have to write data for the table like
<PersonalInfo.>
<name>Harikrishna</name>
<address>India</address>
</PersonalInfo.>
<PersonalInfo.>
<name>Jatin</name>
<address>India</address>
</PersonalInfo.>
Is not possible some thing writing data when defining columns
EDIT :
<xs:element name="name" type="xs:string",Harikrishna,Jatin.... />
<xs:element name="address" type="xs:string",India,India.... />
And how to define more than one table in a single xml file ?
© Stack Overflow or respective owner