Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAX start element why uri is empty

 
Sergio Gazzini
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try understand SAX but cannot understand
this example:


Why on the start of element uri is empty? URI = unique resource indentifier IMHO.
 
Paul Clapham
Sheriff
Posts: 21314
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be because the element in question doesn't have a namespace, and so there's no namespace URI.

Of course I have to say that without being able to see the XML in question, so I can't tell why you think it's wrong. Perhaps you could explain what you think you should see there?

And the documentation of that method also says this:

Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties


You didn't mention what the values of those properties were, either.
 
Sergio Gazzini
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:That would be because the element in question doesn't have a namespace, and so there's no namespace URI.

Of course I have to say that without being able to see the XML in question, so I can't tell why you think it's wrong. Perhaps you could explain what you think you should see there?

And the documentation of that method also says this:

Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties


You didn't mention what the values of those properties were, either.


Understand, sorry for my error URI - unified...

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic