Hi Erdal,
I remember that the SAXSerializer class was written by one of our users [1]. Maybe you are interested in having a closer look at the code?
Christian
[1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/ba...
On Wed, Nov 19, 2014 at 9:29 PM, Erdal Karaca erdal.karaca.de@gmail.com wrote:
Hi all, I am using the SAXSerializer to generate SAX events from an org.basex.query.value.item.Item instance.
The Item instance represents the database doc's root in this specific case:
<r:root xmlns:r="r" xmlns:x="x" x:attr="test"> </r:root>
It seems that when the following method is called:
org.xml.sax.ContentHandler.startElement(String, String, String, Attributes)
the attributes map is missing namespace declarations (I would expect the ns declarations to be mapped to attributes).
I.e. the above r:root element will be provided with just the x:attr in the attributes map, but not the xmlns:x as attribute.
Do you have any solutions for this issue? How do I get the namespaces when startElement() is executed?
Thanks!