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

Read/ Update/ write XML using Dataset()

P: n/a
Hi,
I have a wierd XML file

<Ins>
<HomeP>
<RqUID>SomeRqUID1</RqUID>
<Trans>2006-02-17</Trans>
<HomeL>
<LOB>HOME</LOB>
<Producer>
<ProducerInfo>
<ContractNumber>3098048</ContractNumber>
</ProducerInfo>
<ItemIdInfo>
<A>123456</A>
</ItemIdInfo>
<GeneralP>
<NameInfo>
<CommlName>
<CommercialName>Agent Name</CommercialName>
</CommlName>
</NameInfo>
<Addr>
<AddrTypeCd>MailingAddress</AddrTypeCd>
<Addr1>690 A Ave</Addr1>
<City>City</City>
<StateProvCd>CT</StateProvCd>
<PostalCode>06115</PostalCode>
</Addr>
</GeneralP>
</Producer>
</HomeL>
</HomeP>
</Ins>

As you can see, I cant figure ou how many tbles I am supposed to asume,
or read a first. I need to daisplay this Document on a form, and the
Update it with new values uing A DataSet.
I can read tables like
foreach(DataRow dr in XmlDs.Tables["HomeP"].Rows)
{
Response.Write("0 ele of "+tname+"= "+dr[0]+"<br>");
}

But how do I get to know wether there is a table later or a row?
and XmlDs.Tables["HomeP"].Rows.Count;

gives me 1 ????
How do I go about here?
plz help

Feb 28 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.