> Thanks for the help from everyone. As David said, I can use the code he
> demonstrated to get the value in the attribute of a node.
> However, when I'm trying the same with xalan-c 1.3 (that is the version I
have
> to work with), I can't do so since an exception is being thrown.
> Its being thrown at this point in the code:
>
>                  const NodeRefList             theResult =
>                    theEvaluator.selectNodeList(theDOMSupport,
>                                                      theContextNode,
>
XalanDOMString(xpath.c_str()).c_str(),
 >
theDocument->getDocumentElement());
>
> That seems to work fine when I compile using xalan 1.5, but when I use
xalan
> 1.3 , an exception is being thrown whenever the xpath that is given is
tryign
> to select an attribute ("//name/@first" being the example in this case).

I tested your input with the SerializeNodeSet sample from Xalan 1.3 and did
not get an exception -- it worked as expected.  Generally, if something
works in a later version of Xalan-C, we don't bother to investigate it,
because we never patch earlier releases.

> Can anyone throw any light/advice on what I can do to obtain a collection
of
> all the "first" names from the foo.xml example that's distributed
alongwith
> xalan-c++ ?

Well, since it works in 1.5, why not use 1.5?  Xalan-C++ is already a
year-and-a-half old, and there have been many improvements to the code
since its release.

Dave

Reply via email to