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

"Mark R. Diggory" <mdiggory-Mahy8Y1M33PaZwrp7/[email protected]> Sun, 25 Sep 2005 18:06:30 -0400
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
 >        XmlInputStream 
theStream=theMgr.createLocalFileInputStream("xmlfile_path");

I think you meant:

 >        XmlInputStream 
theStream=theMgr.createLocalFileInputStream(xmlfile_path);

-Mark

Moe wrote:
> 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]
> 


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