This is a discussion on [SimpleXML] echo the whole content of an element (without theelement) within the PHP Language forums, part of the PHP Programming Forums category; I'm trying to understand Php Simple XML. I have an xml file: <resource> <partners><...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm trying to understand Php Simple XML.
I have an xml file: <resource> <partners><acronym title="Free software foundation">Fsf</acronym> and Isotype</partners> </resource> and I have loaded it into $resource With Simple XML i would like to echo the ***whole content*** of the element <partners>, i.e. "<acronym title="Free software foundation">Fsf</acronym> and Isotype". I have tried 1. $partners = $resource->partners->asXML() echo $partners; but it echoes "<partners><acronym title="Free software foundation">Fsf</acronym> and Isotype</partners>". I don't want <partners> and </partners>. 2. $partners = $resource->partners->children()->asXML() echo $partners; but it echoes only "<acronym title="Free software foundation">Fsf</ acronym>", without " and Isotype". Thank you very much. |