Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将一个节点及其所有内容和子节点转换为字符串。
例如我有这个节点
<node i="a"> <child1>azerty</child1> <child2>qwerty</child2> </node>
我想要一个函数来转换为字符串“str1”,字符串的内容将是这样的:
那是与源 xml 文件中完全相同形状的原始节点内容。
这可能会有所帮助:
xmlChar * xmlXPathCastNodeSetToString (xmlNodeSetPtr ns) 将节点集转换为其字符串值。
xmlChar * xmlXPathCastNodeSetToString (xmlNodeSetPtr ns)
从文档