2011-04-21, 22:57:44
I have an XML file which, for testing purposes, I'm reading in, then echoing. It seems not all nodes/elements are read in/echoed back though, one is missing.
The code
The file
Any idea why <title> is missing from the output?
The code
Code:
<?php
# Load the file into an object
$sxml = simplexml_load_file('atom.xml');
# Echo the object to the screen
echo $sxml->asXML();
?>
The file
Code:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<entry>
<title>Testeintrag 01</title>
<link href="http://www.testing-simplexml.de">http://www.test.de</link>
<id>000001</id>
<updated>now</updated>
<summary>...Lorem ipsum</summary>
</entry>
</feed>
Any idea why <title> is missing from the output?
Code:
http://www.test.de 000001 now
...Lorem ipsum