Jump to content

Grabbing data from XML with attributes


sktt

Recommended Posts

Hi,

 

Im trying to grab some data from a XML generated by an external server.

I know how to grab from XML without attributes, but I cant seem to wrap my head around the structure of this file.

What would be easiest way to get the value of  the "dbnr" field?

 

Part of the XML file:

 

<data>
<location>
   <field name="id" format="Long">xxxxxx</field>
   <field name="dbnr" format="Long">xxxxxx</field>
   <field name="jobnr" format="Long">xxxxxx</field>
   <field name="job_type" format="String" maxlen="50">xxxxxx</field>
   <field name="job_category" format="String" maxlen="50">xxxxxx</field>
</location>
</data>

Link to comment
https://forums.phpfreaks.com/topic/219790-grabbing-data-from-xml-with-attributes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.