English 中文(简体)
libxml2 保全空壳
原标题:libxml2 preserve empty tags
  • 时间:2012-05-03 01:09:37
  •  标签:
  • libxml2

libxml2(C)没有保留原来形式的空闲元素。 替换<代码><tag></tag> with <tag/>, 技术上正确,但给我们造成问题。

xmlDocPtr doc = xmlParseFile("myfile.xml");
xmlNodePtr root = xmlSaveFile("mynewfile.xml", doc);

我尝试利用各种选择(使用<代码>xlmReadFile),但似乎没有影响产出。 这里有一个员额提到打断标签,但例子是PERL,我发现C没有类比。

是否有办法消除这种行为?

问题回答

暂无回答




相关问题
What s wrong with this eval statement in Perl?

What s wrong with this eval statement in Perl? I m trying to check that the XML is valid by catching any exceptions thrown from the parsing of the file with XML::LibXML: use XML::LibXML; my $...

Install libxml2 and associated python bindings - Windows

I am attempting to install libxml2 so that I can setup the python bindings and eventually use lxml. However I am unable to work out here on earth I am supposed to be unzipping the files. I haven t ...

iPhone - does TouchXML use an undocumented APIs?

Recently I ve heard that Apple is using tools to search for references to undocumented APIs and are rejecting iPhone apps from the App Store because of it. The popular Three20 framework is causing ...

Python XPath Result displaying only []

Hey I have just started to use Python recently and I want to use it with a bit of xPath, the thing is when I print the result of the query I only get [] and I don t know why =S import libxml2, ...

热门标签