[RESOLVED] XML parsing problems
I have written a rather complicated piece of code, here are lines 25-29 of save_location.php:
PHP Code:
$address_dom = '<street>'.$_POST["street"].'</street><streetNo>'.$_POST["streetno"].'</streetNo><city>'.$_POST["city"].
'</city><postalCode>'.$_POST["tk"].'</postalCode>';
$address_element = new SimpleXMLElement($address_dom);
$current_uni->addChild('address', $address_element);
This gives me the following error and warnings:
Quote:
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Extra content at the end of the document in ***/save_location.php on line 28
Warning: SimpleXMLElement::__construct(): Λάρισα41500 in ***/save_location.php on line 28
Warning: SimpleXMLElement::__construct(): ^ in ***/save_location.php on line 28
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in ***/save_location.php:28 Stack trace: #0 ***/save_location.php(28): SimpleXMLElement->__construct('
Any ideas? It's a part of my thesis, I am really stuck and nervous cause I still have a lot to do :(
Kudos on the website, has helped a lot so far :)