修改tinyxmlparser.cpp文件中的部分代码如下:
TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] =
{
{ "&", 5, "&" },
{ "<", 4, "<" },
{ ">", 4, ">" },
{ """, 6, "\"" },
{ "'", 6, "\'" },
{ "&\#955;", 6, "λ" },
{ "&\#934;", 6, "Φ" },
{ "&\#951;", 6, "η" }
};
const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding )
{
// Presume an entity, and pull it out.
TIXML_STRING ent;
int i;
*length = 0;
// Now try to match it.
for( i=0; i<NUM_ENTITY; ++i )
{
if ( strncmp( entity[i].str, p, entity[i].strLength ) == 0 )
{
assert( strlen( entity[i].str ) == entity[i].strLength );
strncat(value, entity[i].chr, strlen(entity[i].chr));

通过修改tinyxmlparser.cpp文件,扩展了TinyXML库的实体数组,添加了对希腊字母λ, Φ, η的支持,使其能正确解析包含这些特殊字符的XML文档。"
136034954,15828125,RT-DETR与SENetV2:提升目标检测性能,"['深度学习', '计算机视觉', '目标检测', 'RT-DETR', '卷积神经网络']
最低0.47元/天 解锁文章
2226

被折叠的 条评论
为什么被折叠?



