[xml] Root node attributes
- From: Spartaco <spartaco dsplabs net>
- To: xml gnome org
- Subject: [xml] Root node attributes
- Date: Sat, 11 Oct 2014 12:12:52 +0200
Hello guys,
I'm just wondering if is there a simple way in LibXML2 to get an
attribute value from the root node, preferably using the Reader interface.
I have no problems at all with attributes from other nodes, they all are accessible by
xmlTextReaderGetAttribute function, but root.
Apparently LibXML2 discards root node attributes, or may be I'm missing something.
Just to be clear, I intend to parse something like:
<?xml version="1.0" encoding="UTF-8"?>
<Example agent="myclient">
<value1>aaa</value1>
</Example>
and I'd like to get the value of the "agent" attribute.
Can someone give me an hint?
Regards
SM
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]