[gxml] XParser: Namespaced elements just include prefix
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] XParser: Namespaced elements just include prefix
- Date: Thu, 3 Nov 2016 19:32:39 +0000 (UTC)
commit c2114c07a6e2ff0d285a19796b10c81180ebc081
Author: Daniel Espinosa <esodan gmail com>
Date: Thu Nov 3 12:56:24 2016 -0600
XParser: Namespaced elements just include prefix
No more add a namespace definition by default
on namespaced elements
gxml/XParser.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gxml/XParser.vala b/gxml/XParser.vala
index f2acaaa..95e8253 100644
--- a/gxml/XParser.vala
+++ b/gxml/XParser.vala
@@ -341,9 +341,12 @@ public class GXml.XParser : Object, GXml.Parser {
GLib.message (@"Starting Element... '$(node.node_name)'");
GLib.message (@"Element Document is Null... '$((node.owner_document == null).to_string ())'");
#endif
- if ((node as DomElement).prefix != null || (node as DomElement).namespace_uri != null)
- tw.start_element_ns ((node as DomElement).prefix, (node as DomElement).local_name, (node as
DomElement).node_name);
- else
+ if ((node as DomElement).prefix != null
+ || (node as DomElement).namespace_uri != null) {
+ string name = (node as DomElement).prefix
+ + ":" + (node as DomElement).local_name;
+ tw.start_element (name);
+ } else
tw.start_element (node.node_name);
GLib.message ("Write down properties: size:"+(node as DomElement).attributes.size.to_string ());
foreach (string ak in (node as DomElement).attributes.keys) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]