Referencing "attributed" data from An Xml data-island

  • Jonnie79
  • Born
  • Born
  • Jonnie79
  • Posts: 1

Post 3+ Months Ago

OK, so my XML data looks like this:

Code: [ Select ]
<xml id = "internalXMLData">

<Contacts>
<Contact>
<Name>Jonnie Graham</Name>
<Phone type="home">(09) 3888 466</Phone>
<Phone type ="mobile"/>
<Phone type ="work"/>
<email>jonnie@poomail.com</email>
<email>jonnie@*plum*.com</email>
</Contact>

<Contact>
<Name>Andre Sapeas</Name>
<Phone type="home"/>
<Phone type="mobile">(123) 456 3757</Phone>
<Phone type="work"/>
<email>info@somedomain.co.nz</email>
<email>andre_sapeas@somedomain.com</email>
</Contact>
<Contacts>

</xml>
  1. <xml id = "internalXMLData">
  2. <Contacts>
  3. <Contact>
  4. <Name>Jonnie Graham</Name>
  5. <Phone type="home">(09) 3888 466</Phone>
  6. <Phone type ="mobile"/>
  7. <Phone type ="work"/>
  8. <email>jonnie@poomail.com</email>
  9. <email>jonnie@*plum*.com</email>
  10. </Contact>
  11. <Contact>
  12. <Name>Andre Sapeas</Name>
  13. <Phone type="home"/>
  14. <Phone type="mobile">(123) 456 3757</Phone>
  15. <Phone type="work"/>
  16. <email>info@somedomain.co.nz</email>
  17. <email>andre_sapeas@somedomain.com</email>
  18. </Contact>
  19. <Contacts>
  20. </xml>


...see how there is more than 1 "type" of phone number, and more than 1 possible email address?

to reference, say the Name, we would write: <span datafld="Name">, but how would we reference each "type" of phone number (or in other words how woud one reference each specifically/uniquely attributed phone number?), -for example??

Thanks heaps! dry.gif
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 39 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.