File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes DocumentBuilder parse problem 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 "DocumentBuilder parse problem" Watch "DocumentBuilder parse problem" New topic

DocumentBuilder parse problem

Joacim Ahlberg

Joined: Jan 02, 2004
Posts: 5
Hi all,
When I switched from feeding the parse method with a XML file to a XML string the problems began. I do not know where to look for solutions since the parse method should be able to take a string. According to the documentation the javax.xml.parsers.DocumentBuilder handles 5 different parse methods including a parse method for taking a string. Where do I go wrong?
Here are some lines from my code:

My string message I want to include in xmlStr:

The error message is:
Exception C:\forte4j\bin\< (The filename, directory name, or volume label syntax is incorrect)
Best regards
Joacim Ahlberg

Joined: Jan 02, 2004
Posts: 5

Ooh noo I have found another documentation at Sun and it is not a string of XML that will be parsed but an URI.... But my problem is still open though.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Take a look at

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Joacim Ahlberg

Joined: Jan 02, 2004
Posts: 5
I am very greatful, thanks.

best regards
PS. sometimes the answer is closer than you think ...
Mapraputa Is
Leverager of our synergies

Joined: Aug 26, 2000
Posts: 10065
Moving this thread to XML and Related Technologies forum.
[ January 07, 2004: Message edited by: Mapraputa Is ]

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
It is sorta covered in the JavaRanch Style Guide.
subject: DocumentBuilder parse problem
Similar Threads
How DO I Set XSDs in a web app for a Sax Parser?
How to convert string to xml file in java
how to set an attribute like SOAPAction in the Header?
xml:lang in faultstring
Trouble hand rolling SOAP request