[jdom-interest] Re: Very basic question about namespaces.

Bart Read bart at wdi.co.uk
Wed Apr 17 03:37:18 PDT 2002

Hi All,

Just a quick query about namespaces.  Can't seem to find what I'm looking
for in any of my books or on the web but somebody here is bound to know.

We're using JDOM b8 in a messaging application that is used to transfer data
between various organisations.  I have an element like this:

<spoxml:entity name="aaa">

I want to extract the value of the 'name' attribute from the 'spoxml:entity'
element, so do I use

public java.lang.String getAttributeValue(java.lang.String name)


public java.lang.String getAttributeValue(java.lang.String name,
                                          Namespace ns)

to do it?

Is the attribute included within the 'spoxml' namespace because its parent
element is within this namespace, or is it in the default namespace (i.e.
would I need to call it 'spoxml:name' for it to be in the 'spoxml'

Any thoughts much appreciated.


---------- Automatically inserted by WDI Mailserver ----------------
This message has been scanned for virus, trojans, illegal relays and
spam. If you have any comments, problems or questions please do not
hesitate to contact:
Abbotsbury Software Ltd
Tel: +44 1305 871543 Fax: +44 1305 871688
Email: postmaster at wdi.co.uk
Web: http://www.wdi.co.uk/virus.phtml

More information about the jdom-interest mailing list