possibility to use xpath searching on xml balanced chunks

Pavel Stehule via xml <[email protected]> Wed, 5 Sep 2018 10:53:30 +0200
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <CAFj8pRCadb6edjS4yuyU8+o627Q++Mk47Qu8-=rWqSaEjvhGNA@mail.gmail.com>
Hi

I try to fix one issue of PostgreSQL's implementation of XMLTABLE function.
This is based on libxml2 XPath support and without one issue, it works
perfect.

When the xml document is loaded with function xmlCtxtReadMemory(), then
XPath searching via  xmlXPathCompiledEval functions works great. But
SQL/XML allows to works with XML content only, that can be set of trees.

PostgreSQL uses alternative method for validation -
xmlParseBalancedChunkMemory().

Unfortunately XPath searching doesn't work on document loaded by
xmlParseBalancedChunkMemory() function.

the doc says about xmlCtxtReadMemory - "parse an XML in-memory document and
build a tree. This reuses the existing @ctxt parser context",
xmlParseBalancedChunkMemory - "Parse a well-balanced chunk of an XML
document called by the parser ". There is not any word about "build a
tree". Can be this a problem?

Is any possibility to read balanced chunk in format where XPatch searching
is possible?

Regards

Pavel Stehule

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml