Hi Ken, thanks for the fast response. But as per Xalan C++ 1.9 API reference item() function is virtual so it can't be used straight away.
Regards, Amit Dang ----- Original Message ----- From: "Ken" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, June 09, 2005 4:16 PM Subject: Re: How to get Xalan Nodes from NodeRefList > for (xalanc::size_type i = 0; i < theResult.getLength(); ++i) > { > XalanNode * pNode = theResult.item(i); > ..... > } > > > On 6/9/05, Amit Dang <[EMAIL PROTECTED]> wrote: > > Hi All, > > I am using Xalan 1.9 and am stuck with the problem "How to get Xalan > > Nodes from NodeRefList". Following is the code which am using. > > > > > > char* mlpXmlEvent = "<TestCase><TestCaseDetail > > no='1'></TestCaseDetail><TestCaseDetail > > no='2'></TestCaseDetail></TestCase>"; > > char* mlpEventRoot = "TestCase"; > > XalanSourceTreeDOMSupport mTheDOMSupport; > > XalanSourceTreeParserLiaison* mpTheLiaison; > > XalanDocument* mpTheDocumentPtr; > > XPathEvaluator theEvaluator; > > mpTheLiaison = new XalanSourceTreeParserLiaison(mTheDOMSupport); > > mTheDOMSupport.setParserLiaison(mpTheLiaison); > > MemBufInputSource* pMemBufIS = new MemBufInputSource((const > > XMLByte*)mlpXmlEvent, > > strlen(mlpXmlEvent), "xEvent", false); > > // Parse the document... > > mpTheDocumentPtr = mpTheLiaison->parseXMLStream(*pMemBufIS); > > > > XalanNode* pTheContextNode = theEvaluator.selectSingleNode( mTheDOMSupport, > > mpTheDocumentPtr, > > XalanDOMString(mlpEventRoot).c_str(), 0); > > NodeRefList theResult; > > theResult = theEvaluator.selectNodeList(theResult,mTheDOMSupport, > > pTheContextNode, XalanDOMString("TestCaseDetail").c_str()); > > > > ##### How to get XalanNode from 'theResult' i.e. NodeRefList. > > > > Thanks in advance, > > Amit > > > >
