wood burning stoves 2.0*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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 java.io.FileNotFoundException: 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 http://test.javaranch.com/wiki/view?StringToDocument

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 to set an attribute like SOAPAction in the Header?
How to convert string to xml file in java
xml:lang in faultstring
How DO I Set XSDs in a web app for a Sax Parser?
Trouble hand rolling SOAP request