[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Storing Transient DOM at RunTime
Hi,
On Mit, 22 Okt 2036, bhat prashanth wrote:
> DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance ();
> DocumentBuilder db = dbf.newDocumentBuilder ();
> Document doc = db.newDocument ();
> Element root = doc.createElement ("dbAlias");
> root.setAttribute("name",str[1]);
> doc.appendChild (root);
>
> Element first = doc.createElement("jdbcDbURL");
> first.appendChild(doc.createTextNode(str[2]));
> root.appendChild(first);
>
> Element second = doc.createElement("dbUser");
> second.appendChild(doc.createTextNode(str[3]));
> root.appendChild(second);
>
> Element third = doc.createElement("dbPasswd");
> third.appendChild(doc.createTextNode(str[4]));
> root.appendChild(third);
>
> database.open(hostname, 3333, "oz", "air");
> parser =(PersistentDOMParser) new OzoneDOMParser(database);
> Document pDoc = parser.storeDocument(doc, "db.xml");
>
> where doc is Transient document
> I got the following Exception
>
> java.io.ioException at com.sun.xml.tree.xmlDocument
>
> Please Explain Is Anything wrong in creating a Transient DOM and storing it
> using PersistentDOMParser s storeDocument(Document doc, String docname)
> we can't use DOMFactory for creating Transient DOM because of several missing
> packages?
> Thanks
Did you read my answer on your last posting?
Point your browser to
http://www.ozone-db.org/ozone-users/09-2000/msg00025.html
to read this. Send us the stacktrace that you have got. This one line is not
sufficent to solve your problem. Can you use the Xerces DOM implementation for
testing? Simply add the xerces.jar to your CLASSPATH _before_ the SUN XML
Parser iss added.
Regards,
Lars
--
___________________________________________________________________
Lars Martin mailto:lars@smb-tec.com
SMB GmbH http://www.smb-tec.com