本文介绍了以XML值读取空间.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个XML文件,其中包含一些带有节点空格的值.当我尝试从VC ++读取valeu时,得到的值没有空格.如何在不删减空格的情况下读取完整值.

XML文件示例:

Hi,

I have a XML file which contains some values with sapace for a node. When i am trying to read the valeu from VC++ I am getting the values without the space. How can I read the complete value without getting the spaces trimmed off.

Example of XML file:

<Parameter>
    <ParameterName>UserOptions/OperatingSystemSettings/Password</ParameterName>
    <ParameterValue> sudhir </ParameterValue>
</Parameter>


在上面的XML中,请观察值sudhir的开头和结尾处的空格.下面是我必须读取值的代码.


In above XML observe the space at the beginning and the end of the value sudhir. Below is the code I have to read the value.

hr = ((MSXML2::IXMLDOMElement*)objXmlNode)->getElementsByTagName(strParameterValueNode)->Getitem(0)->get_text(&strParameterValue);


请让我知道是否有人知道如何读取完整的值.

问候,
Sudhir


Please let me know if any one knows how to read the complete values.

Regards,
Sudhir

推荐答案



这篇关于以XML值读取空间.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 00:15
查看更多