Read/ Update/ write XML using Dataset()

S

saudakhan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top