[xml] A few question about parsing content

Hi everyone,

I have an application that has to parse a "content" ( ::= (element |
CharData | Reference | CDSect | PI | Comment)* as specified in the
libxml documentation).
Currently we are using xmlParseBalancedChunkMemory to parse it but it
has induced code duplication (mainly due to the fact that we cannot
tune the behavior
with a xmlParserCtxt).
I am trying to find a replacement for that API that should match the
behaviour of xmlParseBalancedChunkMemory (we do not provide xmlDocPtr
and xmlNodePtr as we build the representation ourselves using SAX2
Looking at the documentation, I found 3 candidates:
- xmlParseBalancedChunkMemoryRecover
- xmlParseInNodeContext
- xmlParseContext

First, have I found all the candidates? (I am quite new to libxml so
it is likely that I have missed some)
Then, is there a way to choose between them so that I have a behavior
as close to xmlParseBalancedChunkMemory's as possible by providing a
well-crafted xmlParserCtxt (a pointer about which type to use / how to
initialize it would also be appreciated)?

Thanks a lot,


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