Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML, 5th edition
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning XML, 5th edition
This is the forum to discuss the Wrox book Beginning XML 5th Edition by Joe Fawcett, Danny Ayers, Liam R. E. Quin; ISBN: 978-1-1181-6213-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML, 5th edition section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 27th, 2014, 12:24 PM
Chi Chi is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SaxParser code error

In SaxParser3.java, SaxParser4.java, SaxParser5.java in Chapter 11,

Code:
	public void endElement(String namespaceURI,
			String localName,
			String qName ) throws SAXException {
		System.out.print( "SAX Event: CHARACTERS[ " );
		System.out.println(buffer.toString());
		System.out.println( " ]" );    
		System.out.println( "SAX Event: END ELEMENT[ " + localName + " ]" );
	}
buffer should be reset as follows, so that no extra characters are printed:

Code:
	public void endElement(String namespaceURI,
			String localName,
			String qName ) throws SAXException {
		System.out.print( "SAX Event: CHARACTERS[ " );
		System.out.print(buffer.toString());
		buffer.setLength(0);
		System.out.println( " ]" );       
		System.out.println( "SAX Event: END ELEMENT[ " + localName + " ]" );
	}
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in code nightfox BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 1 January 28th, 2010 03:10 AM
Code error reverand Excel VBA 1 November 15th, 2006 01:08 AM
Error In Code Tegwin BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 March 9th, 2006 06:43 PM
Code error!?!? Brian Campbell BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 November 26th, 2004 06:47 PM
Error displayed with error trap code stoneman Access 4 February 28th, 2004 01:53 PM



All times are GMT -4. The time now is 04:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.