[xml] how to parse in-memory XML *fragments*



Hi all,

well, I'm having a in-memory XML fragment like:

    "Hello, <b>World</b>! <i>biba</i>"

and I'd like to write an XPath functions to return the 
tree representation of the above XML fragment.

However, xmlParseMemory *seems* to expect a complete document, 
and not an XML fragment, in fact, the above example
would than have two root element nodes which is not valid.

Though, what I need, is, to parse this string somehow into an 
XPath node-set I can safely return within my XPath function.

But I couldn't find any good hints within the API/sources :(

Best regards,
Christian Parpart.

Attachment: pgpLNd9t2EZXi.pgp
Description: PGP signature



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