Originally posted by Paul Clapham:
Well, yes, the XPath expression you have in that element does return a string, whereas "/a/c" returns a node list. So you can't pass its result to something that's expecting a node. You'll need to fix your design.
Originally posted by Paul Clapham:
You started out with a lot of description, but it just seems to be background and you don't have any description of your actual problem that I can see. However my diagnosis is, instead of trying to write a generic XPath evaluator where you're going to keep hitting problems every time you try to add a new feature, why not just put those things into an XSL transformation and just run that?
You mean you want to leave parts of the document unparsed? Doubt it. Parsers don't work that way. They convert XML to internal formats. You would have to serialize those bits back to XML if you wanted them that way.
"Storing in an array" versus "Reading from a file"? I don't see any contradiction or overlap between those two concepts. You can parse from pretty much anywhere, and you can store the data wherever you like. Maybe you mistyped something there?