You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Stéphane Rault <ks...@yahoo.fr> on 2005/01/05 11:26:29 UTC
newDOMNode trouble
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@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: newDOMNode trouble
Posted by Franco Lazzarino <fl...@gmail.com>.
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 <ks...@yahoo.fr> 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@xmlbeans.apache.org
> > For additional commands, e-mail: user-help@xmlbeans.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: newDOMNode trouble
Posted by Stéphane Rault <ks...@yahoo.fr>.
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@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org