[xml] possibility to use xpath searching on xml balanced chunks



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


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