It's not a secret anymore!*
The moose likes XML and Related Technologies and the fly likes namespace problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "namespace problem" Watch "namespace problem" New topic

namespace problem

Bram Maes
Ranch Hand

Joined: Sep 27, 2006
Posts: 32
Hi all,

Can someone explain the following :

works well while

throws a NullPointerException... I don't get it...

[ April 07, 2008: Message edited by: Bram Maes ]

SCJP 5.0, SCEA part I
Bram Maes
Ranch Hand

Joined: Sep 27, 2006
Posts: 32
Problem solved. Apparently when using the getElementsByTagNameNS the setNamespaceAware should be set to true while this is not important for getElementsByTagName.

Sorry for bothering all of you.

Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

You would think that in 2008, the default for an XML parser would be for it to be namespace-aware, wouldn't you? But no...
Don't get me started about those stupid light bulbs.
subject: namespace problem
Similar Threads
Suppress text nodes in output when empty
Delete elements from XML file using DOM and java
Searching XML elements using text and work with siblings
technorati api parsing
Can some one help I keep getting a d**m null value and no examples work