logo       

RE: newDOMNode trouble: msg#00034

text.xml.xmlbeans.user

Subject: RE: newDOMNode trouble

Can you can provide the schema and the xml instance that you are saving?

--k

-----Original Message-----
From: Franco Lazzarino [mailto:flazzarino@xxxxxxxxx]
Sent: Thursday, January 06, 2005 8:31 AM
To: user@xxxxxxxxxxxxxxxxxxx
Subject: Re: newDOMNode trouble

i don't know how much this helps but i've had similar null pointer
exps when working with DOM. they were all due to a Text node being
null or the text in it being null.

hope it helps.

Franco


On Thu, 06 Jan 2005 11:47:40 +0100, Stéphane Rault <ksbrault@xxxxxxxx> wrote:
> Hello all again :)
>
> Do you need ore information to understand my problem or nobody can
> answer me ?
>
> TIA
>
> Stéphane.
>
> > Hello all !
> >
> > I'm quite new to xmlBeans and very impress by the work done.
> >
> > I tried to use the newDomNode() to get a DOM access to some point of
> > my document. So I use a getter to optain a XmlObject instance, I print
> > it with toString() and I obtain a xml-fragment. But when I apply the
> > newDomNode() method on this xmlObject, i get this :
> >
> > Exception in thread "main" java.lang.NullPointerException
> > at
> > org.apache.xmlbeans.impl.store.Saver$DomSaver.emitContainer(Saver.java:4514)
> >
> > at
> > org.apache.xmlbeans.impl.store.Saver.processContainer(Saver.java:775)
> > at org.apache.xmlbeans.impl.store.Saver.process(Saver.java:518)
> > at
> > org.apache.xmlbeans.impl.store.Saver$DomSaver.exportDom(Saver.java:4461)
> > at org.apache.xmlbeans.impl.store.Cursor.newDomNode(Cursor.java:2954)
> > at
> > org.apache.xmlbeans.impl.values.XmlObjectBase.newDomNode(XmlObjectBase.java:154)
> >
> > at
> > org.apache.xmlbeans.impl.values.XmlObjectBase.newDomNode(XmlObjectBase.java:151)
> >
> > at test.TestXmlBeans.main(TestXmlBeans.java:47)
> >
> > Did I miss something ?
> >
> > Thanks in advance.
> > --
> > Stéphane.
> >
> > P.S. :
> >
> > My souce code fragment :
> >
> > Options prs =
> > doc.getCommunicationApplication().getGeneral().getOptions(); //
> > Options is the XmlObject instance
> >
> > System.out.println("prs = "+prs);
> > Element elt = (Element) prs.newDomNode();
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx
> > For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise