Hi,
I have a question to ask since I am facing the performance issue. I used the SimpleXPathAPI program to retrieve the Xpath expressions. But in my solution, I have to retrieve the values for many xpath expressions in a given XML. Whenever I call the SimpleXPathAPI, the following steps will get executed again and again even though the XML is same. I tried to move to a different function and tried using variables like theDocument and theLiason. But, it didn’t work. Can any one help me?
Is there any way, I can run the below instructions only once but get the values for different XPath expressions. Any help is appreciated.
XalanSourceTreeInit theSourceTreeInit;
// We'll use these to parse the XML file.
XalanSourceTreeDOMSupport theDOMSupport;
XalanSourceTreeParserLiaison theLiaison(theDOMSupport);
// Hook the two together...
theDOMSupport.setParserLiaison(&theLiaison);
const XalanDOMString theFileName(argv[1]);
// Create an input source that represents a local file...
const LocalFileInputSource theInputSource(theFileName.c_str());
// Parse the document...
XalanDocument* const theDocument =
theLiaison.parseXMLStream(theInputSource);
assert(theDocument != 0);
XalanDocumentPrefixResolver thePrefixResolver(theDocument);
Thanks,
Guru Murthy,
WIPRO Technologies,
Ph: 080 3029 28 28
M: 9845763762
WIPRO VOIP: 808 4445
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com |