List Info

Thread: Problem with partial documents




Problem with partial documents
user name
2007-03-19 12:03:37
Hi.

I am filtering a stream of sax events. If I encounter
certain start tags
I start passing the events to the libxml2 through the SAX2
functions. To
start a valid document I add an XML decl. event and I add
all namespaces
that are currently in use to the root node sax event. 

When the end event is reached I do tree manipulations and
afterward walk
the tree to recreate sax events.

All this works. The only thing that is missing is that I
want to remove
the namespaces I have added to the root node of the partial
document. I
don't find a clean way to do that. I could of course remove
all
namespaces from the root node. This would be bad if the root
node itself
adds a namespace. I could mark all the namespaces I add by
pre- or
postfixing the URLs, but this would add some weirdness to
the tree
processing.

Does anybody have a better idea.

Thanks,
Joachim


_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )