-
simplexml_load_string() warning message
I'm using simplexml_load_string() to load a string into xml format.
This works:
$string = '<Change><name>test</name></Change>';
echo $xml = simplexml_load_string($string);
This is the type of string i want to load, but does not work
$string = '<Change xmlns="http://whateverurl" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><name>test</name></Change>';
echo $xml = simplexml_load_string($string);
The error msg:
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : AttValue: " or ' expected in
This is really confusing, appreciate any help on this
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks