[xml] Proceed on error.

Hello all.

I use libxml (2.6.7) to check if a string of XML is well formed by running it 
through xmlParseMemory.

Sometimes, eg. when encountering "<nacho" or "<d></d><e>", libxml prints an 
error similar to 
"Entity: line 1: error: Couldn't find end of Start Tag nacho"
"Entity: line 1: error: Extra content at the end of the document" and halts 

I just want to catch if the returned doc is NULL or not, free it and return a 
proper value from my function. 

Any idea on how I get xmlParseMemory to proceed instead of halting or any 
alternative ideas?

Morten W. Jørgensen

Newtec A/S
StærmosegÂrdsvej 18
5230 Odense M
Tlf.: 66 15 84 44

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