Skip to content
Advertisement

Tag: simplexml

Retrieve OuterXML From XML Child Node

I need to retrieve the OuterXML for each speak tag. For example, I need to retrieve this data for the first speak tag in test.ssml: index.php test.ssml all tracks.mp3 bookmarks.dat Test 1 Test 2 Current Output in Browser Desired Output Answer You can get the XML directly using the SimpleXML function asXML() and don’t need (as far as I can

How can I show XML external entities in a php page?

I am currently working on a little library project using XML to define books, and php to do a search using title/author then showing that specific book in the browser. So I made a bunch of books in XML files, then linked those files as external entities in my main XML file. I used a DTD to define the entities,

How to retrieve an attribute from a namespaced element

I am trying to get the url attributes from the <media:content> elements in this RSS feed: Here’s what I have so far: This code works for all elements except the ones with a semicolon in the name, like <media:content> or <dc:contributor>. If I open the XML feed in my browser I can see the tag I am looking for: I

CodeIgniter – Process Simple XML & PHP

in the controller I have _send method. This method returns something like below: This method called: I am unable to create array or object suitable for passing to model for inserting into DB. Below what I have now. I am attempting to achieve something like this array: Problem with error attribute with fault array_merge. Any ideas? Answer This is how

Advertisement