Hi:

I am using the latest Xalan for AIX.

I run the sample program like:

xml-xalan/c/bin/XPathWrapper ./foo.xml /doc "/doc/name/text()"

the result set has 10 strings
item 1= "Mr. Marston"
item 2= "Mr. Bertoni"
item 3= "Mr. Leslie"
item 4= "Ms. Farmer"
item 5= "Ms. Midy"
item 6= "Mr. Dick"
item 7= "Mr. Boag"
item 8= "Mr. Curcuru"
item 9= "Mr. Kesselman"
item 10= "Mr. Auriemma"



With no problems.

If I try running it with an invalid XPath expression, the program core dumps.

Like:

xml-xalan/c/bin/XPathWrapper ./foo.xml /doc "/doc/name/txt()"
Abort(coredump)

In the C++ sample code, is there a way to check to see if the XPath expression is valid?

It core dumps on:

line 243 of XPathWrapper.cpp

theXPathProcessor.initXPath(*xpath,
theXPathConstructionContext,
TranscodeFromLocalCodePage(expr),
ElementPrefixResolverProxy(rootElem, theEnvSupport, theDOMSupport));


If I follow this example code, I don't want my code to just crash like this.

Thanks for any help.




Reply via email to