Linked Questions
74 questions linked to/from Parse XML with Namespace using SimpleXML
17 votes
2 answers
6k views
Reference - How do I handle Namespaces (Tags and Attributes with a Colon in their Name) in SimpleXML?
This question is intended as a reference to answer a particularly common question, which might take different forms: I have an XML document which contains multiple namespaces; how do I parse it with ...
0 votes
2 answers
2k views
parse xml with php simplexml [duplicate]
Possible Duplicate: Parse XML with Namespace using SimpleXML PHP SimpleXML Namespace Problem <?php header("Content-Type: text/html; charset=utf-8"); $str = <<<ETO <?xml version="1....
1 vote
1 answer
3k views
parse xml namespace with php [duplicate]
I have been trying to extract data from this XML file from Google Calendar with not much success with the namespaced stuff. It is just the gd and gCal data I am having problems with - I've searched ...
1 vote
0 answers
934 views
Parse YouTube RSS XML data <media:description> using PHP [duplicate]
<entry> <id>yt:video:BpTW-7WGFVk</id> <yt:videoId>BpTW-7WGFVk</yt:videoId> <yt:channelId>UCqWTiyd9_A6oAOKHJkDOlZQ</yt:channelId> <title> ...
0 votes
1 answer
815 views
Parsing XML SOAP response [duplicate]
Im in the process of connecting to a SOAP api, passing some data and then reading the response. Im to the point where I get the SOAP request to send and I get a response but I cannot seem to figure ...
-1 votes
2 answers
332 views
How do I parse this XML with xpath to get to an element directly? [duplicate]
Possible Duplicate: Parse XML with Namespace using SimpleXML I'm new to xpath, and unable to get this to parse. It produces no output. This contains XML returned from Google Map API V3. I want to ...
0 votes
1 answer
535 views
Parsing namepsaced xml [duplicate]
Possible Duplicate: Parse XML with Namespace using SimpleXML I'm having difficult parsing a simpleXml string to get a value out. I've tried $xml = new SimpleXmlElement($simpleXml); $xml->...
1 vote
1 answer
491 views
Using xpath to return array of elements from SOAP response [duplicate]
Given this fragment of a larger SOAP response: <Calendar> <CalendarDay Date="2013-10-01" xmlns="http://webservices.micros.com/og/4.3/Availability/"> <Occupancy> ...
0 votes
3 answers
286 views
Unable to parse elements with : sign [duplicate]
I'm unable to retrieve data from tags with the : sign next to the name. It would be nice to have the avail attribute from the domain:nameelement and the text from the domain:reason. <?xml version="...
0 votes
0 answers
47 views
XML attributes and PHP [duplicate]
Possible Duplicate: Parse XML with Namespace using SimpleXML how do i get the attribute value of seconds from the XML code below: <yt:duration seconds='12445'/> is it possible to use ...
-1 votes
1 answer
40 views
How to address XML content (that has a namespace) with PHP? [duplicate]
I'm trying to get content from an XML document using PHP. This is my current code to get regular XML elements (title and URL). $xml = simplexml_load_file("courses.xml") or die("Error: Cannot create ...
0 votes
0 answers
30 views
how to proccess some tags in xml? [duplicate]
I'm trying to read an xml and its nodes with simplexml, I can open and display it in the browser with print_r for example, but I dont get take the nodes I need , can someone help me? I need to get the ...
658 votes
41 answers
747k views
How can I get useful error messages in PHP?
Quite often I will try and run a PHP script and just get a blank screen back. No error message; just an empty screen. The cause might have been a simple syntax error (wrong bracket, missing semicolon),...
11 votes
3 answers
25k views
simplexml_load_string() will not read soap response with "soap:" in the tags [duplicate]
I know this may be a newbie question, but please humor me. When reading an xml string with "soap:" in the tags, simplexml_load_string() will not read in the xml. given this script: #!/usr/bin/php &...
5 votes
4 answers
19k views
How to get attribute of node with namespace using SimpleXML? [closed]
youtube.xml <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:gd="http://schemas.google.com/g/...