Anyone used this combination before? xerces parser , xalan xpath, use xpath to read nodes from 2 xml files - one referencing the other via entity tags?
thanks, - madhu On 4/26/07, Madhu Lagu <[EMAIL PROTECTED]> wrote:
Can anyone give more pointers to solving this problem? On 4/24/07, Madhu Lagu <[EMAIL PROTECTED]> wrote: > > > > On 4/24/07, David Bertoni <[EMAIL PROTECTED]> wrote: > > > > Madhu Lagu wrote: > > > On 4/23/07, David Bertoni <[EMAIL PROTECTED]> wrote: > > >> > > >> Madhu Lagu wrote: > > >> > Thanks for pointing out the errors, but it still does not work > > after > > >> > correcting the errors. > > ... > > > > >> > > > >> > This Xpath works: /Configuration/test/text() > > >> > This does not :-( > > /Configuration/Component/element/property[1]/text() > > >> > > >> What XPath implementation are you using? Xerces-C doesn't provide > > >> such an > > >> implementation. > > >> > > >> If I use Xalan-C's sample program SimpleXPathAPI, I get the > > expected > > >> result. Is that what you're using? If so, you need to post your > > >> question > > >> on the Xalan-C User list along with your code. > > >> > > >> If you're using some other implementation, you need to ask on > > another > > >> mailing list. > > > > > > > > > I am using the XPath implementation from xalan but the xerces-c > > dombuilder, > > > parser. > > > > The perhaps you need to disable the option to create entity references > > > > nodes. Otherwise, the DOM is not compatible with Xalan-C, and the > > entity > > is represented by an entity reference node, and not the expanded > > value: > > > > > > http://xml.apache.org/xerces-c/program-dom.html#DOMBuilderFeatures > > > > builder->setFeature(XMLUni::fgDOMEntities, false); > > > I did set this to false. Also I set these other options to true: > fgDOMValidation, fgDOMNamespaces, fgXercesSchema, > fgXercesSchemaFullChecking, fgDOMDatatypeNormalization, > fgDOMValidateIfSchema > > Also I am using xerces 2.7 and xalan 1.10. > > The way I am using xalan and xerces to parse Xml files works perfectly > fine for all XPaths except the ones in which the xml files are referencing > each other using entity tags. > > > Dave > > > > > >
