in reply to repairing a broken xml using LibXML

I have noticed the recover flag...

I don't think the recover option is meant to fix/ignore arbitrary garbage input. The docs say (emphasis added):

"The recover mode helps to recover documents that are almost well-formed very efficiently. That is for example a document that forgets to close the document tag (or any other tag inside the document). The recover mode of XML::LibXML has problems restoring documents that are more like well balanced chunks."

Replies are listed 'Best First'.
Re^2: repairing a broken xml using LibXML
by deadpickle (Pilgrim) on Feb 23, 2009 at 04:10 UTC
    In my past experience with these broken xml files it seems that the beginning of the namespace always gets clipped some. Is there a way to repair the namespace?

    Update I was wrong about what gets clipped. Its actually the XML version tag (if thats what its called, I have no idea);<?xml version="1.0" encoding="UTF-8"?>.