• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why Document.isDefaultNamespace() is false?

 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an XML instance with a declared default namespace.

When I parse it with the DocumentBuilder, it returns me a Document reference. And calling Document.isDeclaredNamespace() always returns false; which is wrong. Why ?
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm confused. Are you asking about the org.w3c.dom.Document class? Because I don't see an isDeclaredNamespace() method in the documentation. There is an isDefaultNamespace() method, but it takes a String as a parameter and tells you whether that String is the URI of the default namespace. You didn't mention anything about passing a String to the method, and it does matter what String you pass it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic