Make BXElem return also namespace declarations
Friday, 7 October 2016 · 3 messages · last reply 9 Oct 2016
EK
Erdal Karaca7 Oct 2016 19:03 #
Hi,
I am accessing the DOM tree of the collections in the embedded mode. Now, I need to process the DOM node returned by a query.
For this, Item.toJava() returns a DOM Element (for my specific case/query).
When calling Element#getAttributes(), I only get "direct" attributes, i.e. no namespace declarations are included in the list of attributes. Are the namespace declarations omitted intentionally?
How can I make the BXElem also report them in the resulting attributes list?
Thanks.
CG
Christian Grün9 Oct 2016 20:14 #
Hi Erdal,
Quoted text · Erdal Karaca · 3 lines
> When calling Element#getAttributes(), I only get "direct" attributes, i.e. > no namespace declarations are included in the list of attributes. > Are the namespace declarations omitted intentionally?
Um, I am pretty sure that our DOM implementation should return the results as the default Java implementation...
I remember you were providing us with some great implementation input on our DOM constructors in the past. Would you be willing to once again dive into our code base?
All the best,
Christian
EK
Erdal Karaca9 Oct 2016 20:49 #
Oh, really? Trying to remember...
I will try to dive into the DOM impl and come back with results. Thanks for your support!
2016-10-09 20:14 GMT+02:00 Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 17 lines
> Hi Erdal, > > > When calling Element#getAttributes(), I only get "direct" attributes, > i.e. > > no namespace declarations are included in the list of attributes. > > Are the namespace declarations omitted intentionally? > > Um, I am pretty sure that our DOM implementation should return the > results as the default Java implementation... > > I remember you were providing us with some great implementation input > on our DOM constructors in the past. Would you be willing to once > again dive into our code base? > > All the best, > Christian >
Written for BaseX 8.5. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery