c - 在C中使用xml

标签 c xml

有人知道如何用 C 语言创建和更新 XML 文件吗?

最佳答案

这应该有效:

void main() 
{
    puts(
        "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
        "<feed xmlns=\"http://www.w3.org/2005/Atom\">"
        "    <entry>"
        "        <title type=\"text\">To use xml in C</title>"
        "        <author>"
        "            <name>Punit</name>"
        "            <uri>http://stackoverflow.com/users/352194</uri>"
        "        </author>"
        "        <published>2010-05-27T23:36:02Z</published>"
        "        <updated>2010-05-27T23:37:20Z</updated>"
        "        <summary type=\"html\">"
        "            &lt;p&gt;Any one who knows how to create and update XML file in C?&lt;/p&gt;"
        ""
        "        </summary>"
        "    </entry>"
        "</feed>"
    );
}

关于c - 在C中使用xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2925753/

相关文章:

java - 如何从JDOM获取节点内容

java - 为 Android 设置按钮

c - 如何在 C 中查看字节的位?

c - 性能 - 在 C 中逐行读取巨大的 FASTA 文件

c - loadrunner 中参数的最大长度是多少?

javascript - 查看xml是否有属性和值

c++ - C++ 开发人员可以在诺基亚 N900 上使用什么从麦克风捕获实时音频?

c - 如何获取C中所有驱动器的列表

python - 尝试在 Openerp 7.0 中安装自定义模块时出现 "Invalid XML for View Architecture"错误

php - PDF数据到MYSQL