Search code examples
c++saxxerces

get attribute value by its name


In my c++ code and in using xerces for sax parsing , i want to have attribute's value by it's name . how can i do that ? there is some thing like this in xerces document , but doesn't work :

String identifier = atts.getValue("id"); 

thanks in advance


Solution

  • I have solved this problem using

    XMLCh* identity= XMLString::transcode("id");
    char* identityVal = XMLString::transcode(attrs.getValue(identity));