Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2007, 03:45 AM
Member
 
Join Date: Jul 2007
Posts: 36
boy22 is on a distinguished road
org.xml.sax.SAXParseException: Content is not allowed in trailing section
I'm trying to make an XMLDocument from a String with this information:
Code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Report SYSTEM "Report.dtd"> <Report ><Person name="Jessey"><Date ="2007/1/2"> </Date ></Person ></Report >
This is the code used for creating the Document:
Code:
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); CharArrayReader characterStream = new CharArrayReader(xmlstring.toCharArray()); InputSource is = new InputSource(characterStream); Document documentXML = documentBuilder.parse(is);
and this error appears:
Code:
org.xml.sax.SAXParseException: Content is not allowed in trailing section.
I don't know what is the problem.
do you?
thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2007, 01:07 AM
Member
 
Join Date: Jul 2007
Posts: 44
simon is on a distinguished road
try with xmlString.trim () and StringReader instead of the CharReader
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Asbru Web Content Management 6.7.1 Java Tip Java Announcements 0 04-01-2008 05:14 PM
Xml Parse throws SaxParseException. Encoding is UTF-8 insteadof ISO-8859-1 ? j_kathiresan XML 1 03-28-2008 06:08 PM
Two content panes in one GUI? Leprechaun New To Java 1 01-31-2008 05:02 AM
No duplicates allowed in Sets Java Tip Java Tips 0 01-21-2008 05:33 PM
[Fatal Error] :2:1046: Content is not allowed in trailing section oregon XML 1 07-24-2007 02:44 AM


All times are GMT +3. The time now is 08:32 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org