From: Virgile D. <vd...@je...> - 2005-05-11 13:48:25
|
Hi, i wanted libxmlpp to return me parse errors as libxml2 wrties it to the standard error. For example, when there is a parse error like a redefined attributes, all i can see when i catch the exception is "Document not well-formed.". It would be interesting to see the same message as the one libxml2 outputs to stderr. So first i tried by modifiing the libxmlpp fonction parse_context in domparser.cc. It works by just always checking errno instead of returning when the wellFormed flag is false. But to be more clean, i try to create a new class that inherites from the DomParser one. As parse_context is a virtual function, all i intend to do is to modify the error handling. But i've got the following problem: the constructor "Document(_xmlDoc* doc);" (that is used by parse_context) of the class Document is private and is only available in parse_context because of the "friend class DomParser;" in this class. So i can't find a way to do what i want without modifying libxml++ source code. Can anyone gives me a hint about this wanted feature? |