Hi Dieter

I'm Sorry for this but that error was a typo.
I have sent in both true and false to cloneNode and I always get null
back :-(


Dieter Krogh - Sun Microsystems wrote:
> Hi Christian,
> 
> cloneNode requires a boolean parameter, with the follwing meaning
> 
> true : clone node together with any children
> false : clone without children
> 
> Maybe this is the reason for returning a null object.
> 
> HTH
> Dieter
> 
> Christian Andersson wrote:
>> Hi there, I'm trying to use the xml dom system to read and parse an xml
>> file, so far I have sucessfully managed to do all that I need, except
>> for one thing.
>>
>> I'm not sure why, but I cannot get cloneNode to work, all I get back is
>> a null object..
>>
>> I'm writing all of this in Openoffice.org Basic.
>> here is a sample of what I'm doing
>>
>>     oSFA = createUNOService ("com.sun.star.ucb.SimpleFileAccess")
>>     oInpStream = oSFA.openFileRead(sUrl)
>>     oDB = createUnoService("com.sun.star.xml.dom.DocumentBuilder")
>>     oDoc = oDB.parse(oInpStream)
>>     oInpStream.closeInput
>>
>>     oDoc.getFirstChild()
>>     clone = oDoc.cloneNode
>>
>> clone here will now be null and not a clone of the object as I wanted it
>> to be. Is there anything obvious that I have missed?
>>
>> everything else that I have been doing with the dom system has been
>> working as expected
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
Christian Andersson - [EMAIL PROTECTED]

Configuration and Collaboration for OpenOffice.org
Open Framework Systems AS http://www.ofs.no

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to