This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes SAX start element why uri is empty 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 "SAX start element why uri is empty" Watch "SAX start element why uri is empty" New topic
Author

SAX start element why uri is empty

Sergio Gazzini
Greenhorn

Joined: May 29, 2011
Posts: 12
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

Joined: Oct 14, 2005
Posts: 19719
    
  10

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

Joined: May 29, 2011
Posts: 12
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.
 
Have you checked out Aspose?
 
subject: SAX start element why uri is empty
 
It's not a secret anymore!