Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Schema

Status
Not open for further replies.

netangel

Programmer
Feb 7, 2002
124
PT
I spent the last few days trying to load data into a XML file with a nested structure. My XML file is something like:

<?xml version=&quot;1.00&quot; encoding=&quot;...&quot;?>
<QML version=&quot;1.0&quot; timestamp=&quot;...&quot;>
<HEADER>
<FROM>
<IDENTITY>
<name>user1</name>
<code>u001</code>
</IDENTITY>
<DOMAIN>
<name>user1</name>
<ipaddress>u001</ipaddress>
</DOMAIN>
</FROM>
<TO>
...here is identical to the from tag...
</TO>
</HEADER>

<RequestList>
<Application Action=&quot;LIST_CUSTOMERS&quot;>
<CUSTOMERS>
<code>c0001</code>
<fname>john</fname>
<lname>smith</lname>
</CUSTOMERS>
</Application>
</RequestList>
</QML>

I'm loading it into a dataset, add or edit the rows and save it as a xml file. The problem is that the structure of the new xml file isn't correct. It comes something like:

<QML version=&quot;1.0&quot; timestamp=&quot;...&quot;></QML>
<HEADER></HEADER>
<FROM></FROM>
<IDENTITY></IDENTITY>
<name>user1</name>
<code>u001</code>
<DOMAIN></DOMAIN>
<name>user1</name>
<ipaddress>u001</ipaddress>
...

It looses all the structure. I'm using the Nested property set to true for all the relations.

I can't believe that .NET cant use a xml file with a relational structure.



NetAngel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top