• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why Document.isDefaultNamespace() is false?

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • 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 ?
 
Paul Clapham
Sheriff
Posts: 20980
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic