Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another XML structure that need to be verified
Message
From
03/01/2006 14:42:42
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
Another XML structure that need to be verified
Miscellaneous
Thread ID:
01082789
Message ID:
01082789
Views:
68
I have another XML structure that I need to verify. Basically, I would like to know if this is a good structure or not. Here is an XML example:
<Root>
  <FirstName>Michel</FirstName>
  <LastName>Michel</LastName>
  <Phones>
    <PhoneDetail>
      <Tel>783-9007</Tel>
      <Extension>111</Extension>
      <Type>Home</Type>
      <Code>506</Code>
    </PhoneDetail>
    <PhoneDetail>
      <Tel>783-9008</Tel>
      <Extension>222</Extension>
      <Type>Cellular</Type>
      <Code>507</Code>
    </PhoneDetail>
  </Phones>
</Root>
With that first example, someone could obtain the NodeList of all nodes under Phones to obtain the child records of the employee in regards to his phone numbers.

Now, lets look at this example:
<Root>
  <FirstName>Michel</FirstName>
  <LastName>Michel</LastName>
  <PhoneDetail>
    <Tel>783-9007</Tel>
    <Extension>111</Extension>
    <Type>Home</Type>
    <Code>506</Code>
  </PhoneDetail>
  <PhoneDetail>
    <Tel>783-9008</Tel>
    <Extension>222</Extension>
    <Type>Cellular</Type>
    <Code>507</Code>
  </PhoneDetail>
</Root>
In this second example, the child records are not fully qualified. Thus, AFAIK, if someone wants to get all child records for the phone numbers, he will have to parse the entire XML in a big string and search for occurences of PhoneDetail, apply some processes, etc. I don't see any way to only get all the nodes of PhoneDetail, by the use of the XML objects in .NET, in this example as it is not fully qualified. Does this represent a good XML structure? If yes, how can someone use the XML objects in .NET to process the child records?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform