[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Updating / replacing the content of a Container
On Mon, 23 Jul 2001 18:27:58 +0200
"Per Nyfelt" <per.nyfelt@nordicwave.com> wrote:
> Does anyone have a good suggestion for how to replace (not append) content
> for a container? I have a situation as follows:
>
> 1. I get the DOM Document from the XMLContainer
> 2. Add some stuff to the Document
> 3. Try to update the content using storeDOM(theDocument) but get the
> following Exception:
Hi Per.
Can you send a piece of code? AFAIK, the storeDOM() method is not
intended to perform updates on a given Node/Document but for storing
a whole newly created Document. This should be the reason of your
Exception.
Regards,
Lars
> java.lang.RuntimeException: The given DOM document must not have children if
> a whole document shall be converted!
> at
> org.ozoneDB.xml.util.XMLContainerHelperImpl_Proxy.putChunk(XMLContainerHelpe
> rImpl_Proxy.java:220)
> at org.ozoneDB.xml.util.XMLContainer.storeDOM(XMLContainer.java:234)
> at org.ozoneDB.xml.util.XMLContainer.storeDOM(XMLContainer.java:181)
> at
> org.ozoneDB.xml.cli.resources.XMLResourceImpl.setContentAsDOM(XMLResourceImp
> l.java:216)
> at LevelZeroTest.updateDOMDocument(LevelZeroTest.java:270)
> at LevelZeroTest.testDOM(LevelZeroTest.java:157)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.InflatableMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at junit.framework.TestCase.runTest(TestCase.java:156)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:121)
> at junit.framework.TestSuite.runTest(TestSuite.java:160)
> at junit.framework.TestSuite.run(TestSuite.java:155)
> at junit.framework.TestSuite.runTest(TestSuite.java:160)
> at junit.framework.TestSuite.run(TestSuite.java:155)
> at junit.framework.TestSuite.runTest(TestSuite.java:160)
> at junit.framework.TestSuite.run(TestSuite.java:155)
> at junit.textui.TestRunner.doRun(TestRunner.java:74)
> at junit.textui.TestRunner.run(TestRunner.java:201)
> at XMLDBTestSuite.main(XMLDBTestSuite.java:60)
>
> All suggestions are most welcome.
>
> Best regards,
> Per
>
> ----------------------------------------------------------------------
> Post a message: mailto:ozone-dev@ozone-db.org
> Unsubscribe: mailto:ozone-dev-request@ozone-db.org?body=unsubscribe
> Contact adminstrator: mailto:ozone-dev-owner@ozone-db.org
> Read archived messages: http://www.ozone-db.org/
> ----------------------------------------------------------------------
--
______________________________________________________________________
Lars Martin mailto:lars@smb-tec.com
SMB GmbH http://www.smb-tec.com
----------------------------------------------------------------------
Post a message: mailto:ozone-dev@ozone-db.org
Unsubscribe: mailto:ozone-dev-request@ozone-db.org?body=unsubscribe
Contact adminstrator: mailto:ozone-dev-owner@ozone-db.org
Read archived messages: http://www.ozone-db.org/
----------------------------------------------------------------------