A stored procedure returns the following string - >
Note that there can be one or many "PlatformActivity" and within it "AffectedServers" can contain one or more "AffectedServer" element.
<?xml version="1.0" encoding="utf-8" ?>
<PlatformActivities>
<PlatformActivity xmlns:xsd=\"
http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"
http://www.w3.org/2001/XMLSchema-instance\">
<ActivityKey>-1</ActivityKey>
<ScheduledChangeDateTime>2004-08-31T17:09:00.0000000-04:00</ScheduledChangeDateTime>
<ChangeType>Replace existing hardware</ChangeType>
<ChangeDetails>xxxx</ChangeDetails>
<ChangeReason>xxx</ChangeReason>
<AffectedServers>
<AffectedServer>XA1DFIVR</AffectedServer>
<AffectedServer>XA1PBIVR</AffectedServer>
<AffectedServer>XA1PNIVR</AffectedServer>
<AffectedServer>XA1PAIVR</AffectedServer>
</AffectedServers>
<ImplementerName>xx</ImplementerName>
<RemedyTicketNumber>xx</RemedyTicketNumber>
<PMRNumber>xx</PMRNumber>
<PostImplementationComments>xx</PostImplementationComments>
<Status>In progress</Status>
<ActualDateTimeOfChange>2004-08-31T20:09:00.0000000-04:00</ActualDateTimeOfChange>
<CreatedBy>jkhare1</CreatedBy>
<ModifiedBy>jkhare1</ModifiedBy>
</PlatformActivity>
</PlatformActivities>
When I execute ds.ReadXml( stringReader ), the DataSet does contain two tables (PlatformActivity and AffectedServers) but there is always only one row in the AffectedServer table (which is the first "AffectedServer" element).
How do I get the AffectedServers table populate with ALL the "AffectedServer" elements?
Thanks in advance.
-----------------------
Posted by a user from .NET 247 (
http://www.dotnet247.com/)