-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a chunk of code that returns a NodeRefList from a XPathEvaluator, and I'm stepping over the list getting an XalanNode * for each element. I can print the node name, I can get its attributes and print their values, but XalanNode::getNodeValue() just seems to return empty strings.
The code below consistently generates the output:
Node 1 float_array =
   Attrib id = box-Pos-array
   Attrib count = 24
Node 1 float_array =
   Attrib id = box-0-Normal-array
   Attrib count = 18
when run on this fragment of XML:

        <float_array id="box-Pos-array" count="24">
          -0.5  0.5  0.5
           0.5  0.5  0.5
          -0.5 -0.5  0.5
           0.5 -0.5  0.5
          -0.5  0.5 -0.5
           0.5  0.5 -0.5
          -0.5 -0.5 -0.5
           0.5 -0.5 -0.5
        </float_array>
        <float_array id="box-0-Normal-array" count="18">
           1.0  0.0  0.0
          -1.0  0.0  0.0
           0.0  1.0  0.0
           0.0 -1.0  0.0
           0.0  0.0  1.0
           0.0  0.0 -1.0
        </float_array>


           tsAssert(theResult.getLength() > 0);
            for(size_t i=0;i<theResult.getLength();++i) {
                    XalanNode *nd = theResult.item(i);
                    cout << "Node " << nd->getNodeType() << " "
                         << TranscodeToLocalCodePage(nd->getNodeName())
                         << " = "
<< TranscodeToLocalCodePage(nd->getNodeValue ())
                         << endl;

const XalanNamedNodeMap * attribs = nd- >getAttributes();
                    for(size_t j=0;j<attribs->getLength();++j) {
cout << " Attrib " << attribs->item(j)- >getNodeName()
                                             << " = "
<< attribs->item(j)- >getNodeValue()
                                             << endl;
                    }
            }

Is there any obvious reason why nd->getNodeValue() isn't returning me my data?

Thanks,
    Paul

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFBvoHr7+oA6AsvAkRAnojAKDlbf4e9V1/zn3UF3QWgsTIadmd6QCbBf9Y
BRR1Sxz0YBEq4h8xxjNsWGY=
=3CZD
-----END PGP SIGNATURE-----

Reply via email to