Re: [bdbxml] XMLInputStreams and regular InputStreams and w3c DOM objects.

Moe <[email protected]> Sun, 25 Sep 2005 21:49:19 +0000 (UTC)
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
Talking about XmlInput-Streams, what's the matter with this:

//---------Code
XmlUpdateContext theContext = theMgr.createUpdateContext();
		    		 
String xmlfile_path="H:/testingberkeleydbxml/xmldata/test.xml";

 File checkfile = new File (xmlfile_path);
  if (checkfile.exists()){System.out.println("File's available");
       XmlInputStream theStream=theMgr.createLocalFileInputStream("xmlfile_path");
       XmlDocument entry = theMgr.createDocument();
       entry.setContentAsXmlInputStream(theStream);
       entry.setName("some name");
       openedContainer.putDocument(entry,theContext);}
//---------/Code

Causing an error message like that:

File's available
com.sleepycat.dbxml.XmlException: Error: The resource does not exist: malformed
or non-existent stream source, errcode = INVALID_VALUE

And here's the content of the xml-file I'm trying to put in:

<?xml version="1.0" ?> 
- <data>
  <id>1</id> 
  <content>Dies ist voellig sinnlos</content> 
  </data>

Any ideas/suggestions?

Thanks in advance 'n keep it going,

M.B.



------------------------------------------
To remove yourself from this list, send an
email to [email protected]