says, I am possible
By: padya
22 Jul 2011When you google to get a solution to retrieve all the or single tag xml values/attributes you may get approx 10,400,000 results.
Common solution will be to create a module, bring down your own function, bla-bla bla.......
The simplest and statistical way to get is using inbuild drupal functions.
1. $getXML = drupal_http_request( $url ); //$url is the url to get the xml
2. To retrieve only single tag.
NB: casting can be of any data type as per needed. "</tag>" is from which tag to retrieve value. $getXML is from 1.
2. To retrieve all tags in an array.
NB: This will return all the attributes with array. $getXML->data contains all the xml tags.
No Responses yet to Retrieve values/attributes from XML in an array
Post new comment