• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAX parser

 
Manoj Zachariah
Ranch Hand
Posts: 65
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic