Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

u_compute_xpath_node_set () taking very long

Help
2008-02-15
2013-04-30
  • I am using tinyxpath for implementing a functionality similar to MSXML's selectSingleNode. I create a xpath_processor object and pass the node and the xpath string. Then i call u_compute_xpath_node_set (). This computes the node set and also returns the number of nodes. This takes a very long time if the xml file is large. Is there a way to get only the first matching node using tinyxpath. I also tried TinyXPath::XNp_xpath_node but internally it also calls u_compute_xpath_node_set () which takes a very long time to process a large xml file.

    I do not understand why it should take so long to process the xpath once the document is loaded in memory. MSXML does not take so much time for selectSingleNode.

    Any ideas/suggestions will be much appreciated.