<br><font size=2 face="sans-serif">I think it may have something to do with your file separator slash.</font>
<br>
<br><font size=2 face="sans-serif">Try either a double backslash in your string - \\ or try explicitly using File.separator, that will take the correct file separator for your platform.</font>
<br>
<br><font size=2 face="sans-serif">I've also had problems using spaces in filenames occasionally. This is less likely, but if the slash change doesn't work, try renaming your subdirectory to one without spaces.</font>
<br>
<br><font size=2 face="sans-serif">Wes</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Mark Bennett <mbennett@ideaeng.com></b></font>
<br><font size=1 face="sans-serif">Sent by: jdom-interest-admin@jdom.org</font>
<p><font size=1 face="sans-serif">10/26/2001 09:28 AM</font>
<br><font size=1 face="sans-serif">Please respond to mbennett</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To: "Lopez, William" <william.lopez@eds.com>, jdom-interest@jdom.org</font>
<br><font size=1 face="sans-serif"> cc: </font>
<br><font size=1 face="sans-serif"> Subject: RE: [jdom-interest] help XMLOutputter</font></table>
<br>
<br>
<br><font size=2 face="Courier New">Hello William,<br>
<br>
No problem on the question; newbies unite! :)<br>
<br>
Where you have:<br>
String file = "c:/Documents and Settings/xzs3h2/jbproject/DTDMap/" + newTime<br>
+ "_acceptance.xml";<br>
<br>
Could you check the value of the file variable after this command? Either<br>
in your debugger or maybe with:<br>
<br>
System.out.println( "file name ='" + file + "'" );<br>
<br>
That might be helpful for debugging.<br>
<br>
Mark<br>
<br>
-----Original Message-----<br>
From: jdom-interest-admin@jdom.org [mailto:jdom-interest-admin@jdom.org]On<br>
Behalf Of Lopez, William<br>
Sent: Friday, October 26, 2001 6:54 AM<br>
To: jdom-interest@jdom.org<br>
Subject: [jdom-interest] help XMLOutputter<br>
<br>
The issue I'm having is probably more of a "basic" coding issue than a JDOM<br>
issue but I'll try my luck here first.<br>
<br>
I'm attempting to use the XMLOutputter class to create XML files from a JDOM<br>
object that is retrieving Clob files from a database so I can see the test<br>
data. Here's the code for that piece:<br>
<br>
inputsource = new InputSource(is);<br>
doc = builder.build(inputsource);<br>
<br>
StringBuffer sb = new StringBuffer();<br>
String wholeTime = new<br>
java.sql.Timestamp(System.currentTimeMillis()).toString();<br>
String date = wholeTime.substring(0, 10);<br>
sb.append(date).append("_");<br>
sb.append(wholeTime.substring(11,19));<br>
String newTime = sb.toString();<br>
<br>
String file = "c:/Documents and<br>
Settings/xzs3h2/jbproject/DTDMap/acceptance.xml";<br>
OutputStream os = new FileOutputStream(file, true);<br>
XMLOutputter xo = new XMLOutputter(" ", true, "UTF-8");<br>
xo.setTextNormalize(true);<br>
xo.output(doc, os);<br>
<br>
This works but I don't want to append [new FileOutputStream(file, true);]<br>
each XML image in the one acceptance.xml file. I was trying to use the<br>
following code to create different file names: String file = "c:/Documents<br>
and Settings/xzs3h2/jbproject/DTDMap/" + newTime + "_acceptance.xml"; but I<br>
was receiving a "bad parameter" error message at: OutputStream os = new<br>
FileOutputStream(file, true);<br>
<br>
Sorry for the newbie question but any suggestions would be appreciated.<br>
<br>
Thanks,<br>
<br>
William Lopez<br>
EDS - Health and Insurance Solution Centre<br>
MS C3-1C-37<br>
5400 Legacy Drive<br>
Plano, TX 75024<br>
<br>
* phone: +01-972-604-3372 (834-3372)<br>
* mailto:william.lopez@eds.com<br>
www.eds.com<br>
<br>
<br>
_______________________________________________<br>
To control your jdom-interest membership:<br>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos<br>
t.com<br>
<br>
_______________________________________________<br>
To control your jdom-interest membership:<br>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com<br>
</font>
<br>
<br>