[xml] Question regarding Xpath and streaming


I've a question regarding xpath and streaming (xmlWriter):

I use xpath to filter a document so I get selected (or filtered) nodes.
I also use xmlWriter to stream output. I wonder if I can use both

Libxml xpath works by first getting xmlXpathContextPtr (API:
xmlXpathNewContext(doc)), this means the document (doc) has to be
available. But if I'm streaming the data into a file
(xmlNewTextWriterFilename()), I don't have the doc available. So how can
I apply the xpath filtering in xmlWriter streaming?

Yong Chen

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