This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SAX parser

 
Manoj Zachariah
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public void startElement(String namespaceURI, String localName,String qName, Attributes attr) throws SAXException
in the event startElement, what is the difference between localName and qName.
thanks
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "local name" is the name of the element and "qname" (qualified name) is the namespace aware version, which includes the element's namespace prefix.
 
Manoj Zachariah
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a SAX parser and i tried
System.out.println(localName);
it justed printed blank lines. but when i tried
System.out.println(qName);
it printed correctly all the name correctly.
my xml file doesnt have any namespaces.
thanks in advance
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!