如何libxml2的用来解析XML数据? [英] How can libxml2 be used to parse data from XML?

查看:324
本文介绍了如何libxml2的用来解析XML数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在libxml2的code样品环顾四周,我很困惑如何将它们都拼凑。

I have looked around at the libxml2 code samples and I am confused on how to piece them all together.

什么是使用libxml2的时候只解析或从XML文件中提取数据?所需的步骤。

What are the steps needed when using libxml2 to just parse or extract data from an XML file?

我想弄个,以及可能存储,某些属性信息。如何做到这一点?

I would like to get hold of, and possibly store information for, certain attributes. How is this done?

推荐答案

我相信你首先需要创建一个解析树。也许这篇文章可以帮助,期待通过它说<一节href=\"http://www.developer.com/xml/article.php/3729826/Libxml2-Everything-You-Need-in-an-XML-Library.htm\"相对=nofollow>如何解析与libxml2的树。

I believe you first need to create a Parse tree. Maybe this article can help, look through the section which says How to Parse a Tree with Libxml2.

这篇关于如何libxml2的用来解析XML数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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