By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,361 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,361 IT Pros & Developers. It's quick & easy.

Parsing attributes and elements of XSD file

P: n/a
In one of my applications,user will provide the .XSD file and i 've to parse
thru the Elements and attributes
and generate the XML string.

Example:

XSD file :

?xml version="1.0" standalone="yes"?>
<xs:schema id="users" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="users" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="user">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="0"
msdata:Ordinal="0" />
<xs:element name="age" type="xs:string" minOccurs="0"
msdata:Ordinal="1" />
<xs:element name="email" type="xs:string" minOccurs="0"
msdata:Ordinal="2" />
<xs:element name="credit" type="xs:string" minOccurs="0"
msdata:Ordinal="3" />
<xs:element name="username" type="xs:string" minOccurs="0"
msdata:Ordinal="4" />
<xs:element name="password" type="xs:string" minOccurs="0"
msdata:Ordinal="5" />
</xs:sequence>
<xs:attribute name="userid" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

From this file I need to generate XMl string like
<users><user userId=""><name/><age/><Email><creadit>...</user></users>

Any way of doing this ?

Help needed

Thanks in advance,
Raju


Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

:confused: i'd like to know more about connecting to xsd file as a
datasource...
--
taersious
------------------------------------------------------------------------
taersious's Profile: http://www.hightechtalks.com/m784
View this thread: http://www.hightechtalks.com/t2004434

Jan 22 '06 #2

P: n/a

:confused: i'd like to know more about connecting to xsd file as a
datasource...
--
taersious
------------------------------------------------------------------------
taersious's Profile: http://www.hightechtalks.com/m784
View this thread: http://www.hightechtalks.com/t2004434

Jan 22 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.