M
Mark Fox
Hello,
I'm new to XML in ASP.NET and have some XML:
<Reason>
<ReasonCategory>Death</ReasonCategory>
<Contacts>
<Contact>
<Name></Name>
<Phone></Phone>
<Address></Address>
<CityStateZip></CityStateZip>
<Relation></Relation>
<IsMember></IsMember>
</Contact>
</Contacts>
<ReasonDetails>
<PlaceOfDeath></PlaceOfDeath>
<CauseOfDeath></CauseOfDeath>
<FuneralLocationName></FuneralLocationName>
<FuneralLocationAddress></FuneralLocationAddress>
<FuneralLocationCity></FuneralLocationCity>
<FuneralLocationState></FuneralLocationState>
<FuneralLocationZip></FuneralLocationZip>
<FuneralLocationPhone></FuneralLocationPhone>
<FuneralDateTime></FuneralDateTime>
<FoodRequirements></FoodRequirements>
<ReasonDetails>
<RequestedServices>
<RequestedService>
<OfferedServiceID></OfferedServiceID>
<OfferedServiceName></OfferedServiceName>
<AssignedTo></AssignedTo>
<FollowUpID></FollowUpID>
</RequestedService>
</RequestedServices>
<FormDetails>
<CompletedBy></CompletedBy>
<CompletedDate></CompletedDate>
<InformationProvider></InformationProvider>
<Notes></Notes>
</FormDetails>
</Reason>
That I'm looking to parse and write. Using XmlTextReader
with a switch(reader.Name) is pretty tedious. Is there a
way to just load the whole string into a tree-like object
where I could do a
foreach(Node Contact in Contacts)
type of thing and just reference nodes by a
string Notes = Node["Notes"].Value;
type of code? Any help would be appreciated! Thanks so
much!
I'm new to XML in ASP.NET and have some XML:
<Reason>
<ReasonCategory>Death</ReasonCategory>
<Contacts>
<Contact>
<Name></Name>
<Phone></Phone>
<Address></Address>
<CityStateZip></CityStateZip>
<Relation></Relation>
<IsMember></IsMember>
</Contact>
</Contacts>
<ReasonDetails>
<PlaceOfDeath></PlaceOfDeath>
<CauseOfDeath></CauseOfDeath>
<FuneralLocationName></FuneralLocationName>
<FuneralLocationAddress></FuneralLocationAddress>
<FuneralLocationCity></FuneralLocationCity>
<FuneralLocationState></FuneralLocationState>
<FuneralLocationZip></FuneralLocationZip>
<FuneralLocationPhone></FuneralLocationPhone>
<FuneralDateTime></FuneralDateTime>
<FoodRequirements></FoodRequirements>
<ReasonDetails>
<RequestedServices>
<RequestedService>
<OfferedServiceID></OfferedServiceID>
<OfferedServiceName></OfferedServiceName>
<AssignedTo></AssignedTo>
<FollowUpID></FollowUpID>
</RequestedService>
</RequestedServices>
<FormDetails>
<CompletedBy></CompletedBy>
<CompletedDate></CompletedDate>
<InformationProvider></InformationProvider>
<Notes></Notes>
</FormDetails>
</Reason>
That I'm looking to parse and write. Using XmlTextReader
with a switch(reader.Name) is pretty tedious. Is there a
way to just load the whole string into a tree-like object
where I could do a
foreach(Node Contact in Contacts)
type of thing and just reference nodes by a
string Notes = Node["Notes"].Value;
type of code? Any help would be appreciated! Thanks so
much!