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
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "DocumentBuilder parse problem" Watch "DocumentBuilder parse problem" New topic
Author

DocumentBuilder parse problem

Joacim Ahlberg
Greenhorn

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
Joacim Ahlberg
Greenhorn

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.
Joacim
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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
Greenhorn

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

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

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