Linked Questions
92 questions linked to/from Reference - How do I handle Namespaces (Tags and Attributes with a Colon in their Name) in SimpleXML?
61 votes
6 answers
97k views
Parse XML with Namespace using SimpleXML [duplicate]
I have this as xml: <root xmlns:event="http://www.webex.com/schemas/2002/06/service/event"> <event:event> <event:sessionKey></event:sessionKey> <event:...
15 votes
5 answers
41k views
parse an XML with SimpleXML which has multiple namespaces [duplicate]
I have this ugly XML which has alot of namespaces on it, when I try to load it with simpleXML if i indicate the first namespace I'd get an xml object ,but following tags with other namespaces would ...
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 &...
4 votes
2 answers
10k views
How to get media:content with SimpleXML [duplicate]
I have an XML feed that i could fetch news about cyprus on a news site. I want to use news images and of course news itself. Here is a sample of xml <item> <title>Rumlardan KKTC ...
2 votes
3 answers
3k views
How do I parse XML containing custom namespaces using SimpleXML? [duplicate]
I'm wondering how to parse values in XML that appear to have : in their name. I've been using: $response = file_get_contents($url); $data = simplexml_load_string($response); then doing a: foreach(...
0 votes
1 answer
7k views
How to access <content:encoded> with CDATA from RSS feed? [duplicate]
Problem If you try to access <content:encoded> in a RSS feed the result will be null. XML <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <channel>...
2 votes
1 answer
1k views
How to parse an image tag in xml sitemap? [duplicate]
<url> <loc> <![CDATA[ https://www.news18.com/photogallery/photogallery/in-photos-five-most-expensive-face-masks-for-protection-from-covid-19-in-the-world-3519821.html ]]> </loc>...
2 votes
2 answers
739 views
simplexml and accessing feedburner's : [duplicate]
I'm trying trying to use simplexml to read a feedburner xml. I can read every properties in the xml but not the keys with ':' in it. Example "feedburner:origLink". When I vardump the items, those keys ...
0 votes
1 answer
974 views
Accessing items in an RSS feed using SimpleXMLElement [duplicate]
I am trying to read this RSS feed using PHP. Small snippet from the XML: <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="...
0 votes
1 answer
803 views
How to drill into SOAP Namespaces with SimpleXML & PHP [duplicate]
All, I am trying to access element ebl:RequesterCredentials in a SOAP response but having no success so far. I am using PHP SimpleXML. The issue for me at least is registering the ebl namespace - All ...
1 vote
1 answer
614 views
soap xml response - how to get that stubborn data out [duplicate]
I'm trying to get the contents of the faultstring element and I'm more comfortable with SimpleXML's object syntax ($xml->...->faultstring.) The DomDocument method below works, but I'd prefer to ...
2 votes
1 answer
356 views
Why can't PHP print xml code with Dublin Core tags? [duplicate]
I tried to print the content of the file affresco.xml with this php function: <?php $xml=simplexml_load_file("http://localhost/chiesa/affresco.xml") or die("Error: Cannot create object"); echo $...
2 votes
2 answers
441 views
SimpleXML Namespace or SemiColin [duplicate]
Im having a problem getting a namespaced (Or semi-colin') item with PHP's SimpleXML. I've done a little digging through google and tried the likes if asXML but im back at square one. The part I can't ...
0 votes
1 answer
632 views
simplexml_load_file not working for some xml [duplicate]
I have a basic common line to parse xml from file. The issue is XML 2 is parsing fine,but XML 1 is returning NULL. I have checked all errors ,look into everything,couldn't figure out yet. Also tried ...
0 votes
1 answer
402 views
simplexmlelement object doesn't list all children [duplicate]
I have this xml file : <?xml version="1.0" encoding="utf-8" ?> <rss xmlns:g="http://base.google.com/ns/1.0" version="2.0"> <item> <!-- Basic Product Information -->...