Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another XML structure that need to be verified
Message
De
03/01/2006 14:42:42
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
XML
Titre:
Another XML structure that need to be verified
Divers
Thread ID:
01082789
Message ID:
01082789
Vues:
69
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform