使用c ++进行xml解析 [英] xml parsing using c++

查看:140
本文介绍了使用c ++进行xml解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行一个程序来解析CPP中的xml文件。

我使用了DOM解析器,我发现了以下错误:



错误.. \INCLUDE \XML.H 151:''xml_element'的多重声明'

错误SAMPLE.CPP 11:''节点''无法启动参数声明

错误SAMPLE.CPP 12:''节点''无法启动参数声明

错误SAMPLE.CPP 16:声明语法错误

错误样本。 CPP 20:未定义的符号''XMLParser''

错误SAMPLE.CPP 20:语句丢失;

错误SAMPLE.CPP 21:未定义的符号''ub4''

错误SAMPLE.CPP 21:语句丢失;

错误SAMPLE.CPP 22:语句丢失;

错误SAMPLE.CPP 23:未定义符号'' flags''

错误SAMPLE.CPP 23:未定义的符号''XML_FLAG_VALIDATE''

错误SAMPLE.CPP 23:未定义的符号''XML_FLAG_DISCARD_WHITESPACE''

E. rror SAMPLE.CPP 31:未定义的符号''ecode''

错误SAMPLE.CPP 31:未定义的符号''解析器''

错误SAMPLE.CPP 39:未定义的符号''oratext''

错误SAMPLE.CPP 39:表达式语法

错误SAMPLE.CPP 40:如果语句丢失)

错误样本。 CPP 46:未定义的符号''n-speech''

错误SAMPLE.CPP 54:''节点''无法启动参数声明

错误SAMPLE.CPP 56:未定义的符号''节点''

错误SAMPLE.CPP 56:未定义的符号''title''

错误SAMPLE.CPP 56:未定义的符号''speak''

错误SAMPLE.CPP 58:语句丢失;

错误SAMPLE.CPP 60:指向左侧所需结构的指针 - >或 - > *

错误SAMPLE.CPP 63:指向左侧所需结构的指针 - >或者 - >> *

错误SAMPLE.CPP 63:错误或警告信息太多



您能否帮我纠正错误并解决问题?

I am trying to execute a program to parse an xml file in CPP.
I used DOM parser and I found the following errors:

Error ..\INCLUDE\XML.H 151: Multiple declaration for ''xml_element''
Error SAMPLE.CPP 11 :''Node'' cannot start a parameter declaration
Error SAMPLE.CPP 12 :''Node'' cannot start a parameter declaration
Error SAMPLE.CPP 16 :Declaration syntax error
Error SAMPLE.CPP 20 :Undefined symbol ''XMLParser''
Error SAMPLE.CPP 20: Statement missing;
Error SAMPLE.CPP 21:Undefined symbol ''ub4''
Error SAMPLE.CPP 21:Statement missing ;
Error SAMPLE.CPP 22:Statement missing ;
Error SAMPLE.CPP 23:Undefined symbol ''flags''
Error SAMPLE.CPP 23:Undefined symbol ''XML_FLAG_VALIDATE''
Error SAMPLE.CPP 23:Undefined symbol ''XML_FLAG_DISCARD_WHITESPACE''
Error SAMPLE.CPP 31:Undefined symbol ''ecode''
Error SAMPLE.CPP 31:Undefined symbol ''parser''
Error SAMPLE.CPP 39:Undefined symbol ''oratext''
Error SAMPLE.CPP 39:Expression syntax
Error SAMPLE.CPP 40:If statement missing )
Error SAMPLE.CPP 46: Undefined symbol ''n-speech''
Error SAMPLE.CPP 54: ''Node'' cannot start a parameter declaration
Error SAMPLE.CPP 56: Undefined symbol ''Node''
Error SAMPLE.CPP 56: Undefined symbol ''title''
Error SAMPLE.CPP 56: Undefined symbol ''speak''
Error SAMPLE.CPP 58:Statement missing ;
Error SAMPLE.CPP 60: Pointer to structure required on left side of -> or ->*
Error SAMPLE.CPP 63: Pointer to structure required on left side of -> or ->*
Error SAMPLE.CPP 63: Too many error or warning messages

Would you kindly help me to correct the errors and solve the problem?

推荐答案





目前尚不清楚 - 从您发布的问题 - 您用于解析的XML库。但在我看来它肯定不是MSXML。因此,我的第一个建议是使用MSXML库。



Best Regrads,

JK
Hi,

It is not clear - from the question you posted - what XML library you use for parsing. But is seems to me that it certainly is NOT a MSXML. Thus, my first advice is to use MSXML library.

Best Regrads,
J. K.


这篇关于使用c ++进行xml解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆