loadXML() strangeness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maybe it's just me, but this isn't behaving as I think it should.
loadXML() is supposed to return T/F, depending on if it's succeeded or
not. and should throw a false if the XML isn't well-formed. however,
that's not what I'm seeing here. during some testing, the XML I'm trying
to load is blank (except for maybe a return), but it seems to be
returning true and trying to parse it. basically, all I'm doing is:
 
if($dom->loadXML($fxml) == true){...}

and it appears that the code inside the if is running (I'm writing a
file out of the XML that's being parsed and it's showing up - although
it's empty). here's the warning that's being sent to the page:

Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Start
tag expected, '<' not found in Entity, line: 2 in
C:\www\op.dev\public_html\assets\inc\parser.php on line 278

Guess I could always check for a beginning <, but I assumed that
loadXML() would do this? what's the scoop here?

Bill

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux