通过属性名获取属性值 在我的C++代码中,在使用XECES进行SAX解析时,我希望具有属性的值 我叫它的名字。 我该怎么做? xerces文档中有类似的内容,但不起作用: String identifier = atts.getValue("id");

通过属性名获取属性值 在我的C++代码中,在使用XECES进行SAX解析时,我希望具有属性的值 我叫它的名字。 我该怎么做? xerces文档中有类似的内容,但不起作用: String identifier = atts.getValue("id");,c++,sax,xerces,C++,Sax,Xerces,提前感谢我已使用 XMLCh* identity= XMLString::transcode("id"); char* identityVal = XMLString::transcode(attrs.getValue(identity)); 我已经用计算机解决了这个问题 XMLCh* identity= XMLString::transcode("id"); char* identityVal = XMLString::transcode(attrs.getValue(identity))

提前感谢

我已使用

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

我已经用计算机解决了这个问题

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

此代码生成如下编译错误:无法在返回
getValue
时将char*转换为xml_sizetUse,并将其分配给常量char*char*from=XMLString::transcode(attrs.getValue(“from”);它生成此错误:从“const char*”到“XMLSize_t{aka long unsigned int}”的转换无效此代码生成如下编译错误:无法在返回
getValue
时将char*转换为xml_sizetUse,并将const char*char*from=XMLString::transcode(attrs.getValue(“from”);它生成此错误:从“const char*”到“XMLSize_t{aka long unsigned int}”的转换无效