Wczytywanie pliku xml - operacja ta zawsze kończyła się pomyślnie. Ostatnio jednak, dostaję niespodziewany komunikat (z CMS):
Kod
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:1: parser error : Space required after the Public Identifier in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:1: parser error : SystemLiteral " or ' expected in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:1: parser error : SYSTEM or PUBLIC, the URI is missing in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:11: parser error : Opening and ending tag mismatch: hr line 9 and body in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: </body></html> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:11: parser error : Opening and ending tag mismatch: body line 4 and html in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: </body></html> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:12: parser error : XML declaration allowed only at the start of the document in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: <?xml version="1.0" encoding="UTF-8"?> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:13: parser error : Premature end of data in tag html line 2 in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:1: parser error : SystemLiteral " or ' expected in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:1: parser error : SYSTEM or PUBLIC, the URI is missing in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:11: parser error : Opening and ending tag mismatch: hr line 9 and body in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: </body></html> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:11: parser error : Opening and ending tag mismatch: body line 4 and html in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: </body></html> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:12: parser error : XML declaration allowed only at the start of the document in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: <?xml version="1.0" encoding="UTF-8"?> in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: cennik/kategorie.xml:13: parser error : Premature end of data in tag html line 2 in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: in aktualizacja.php on line 169
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in aktualizacja.php on line 169
Fragment kodu z aktualizacja.php
$object = simplexml_load_file('cennik/kategorie.xml');
i z pliku xml (pierwsze linie dokumentu).
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>xxx</title> </head><body> <h1>xxx</h1> xxx<br />/xxx<br /> xxx <hr> <address>xxx</address> </body></html> <?xml version="1.0" encoding="UTF-8"?> >>dalej to już poufne dane<<
Nowicjuszem jestem w tych sprawach - próbowałem sam rozwiązać problem (sugerując się 'Warning' od CMS) jednak bez skutecznie. Zwracam się do was z prośbą o pomoc.
Pozdrawiam.