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/09 10:25:53 UTC

RE : RE : newDOMNode trouble

Thanks !! I will try it with V2, i didn't see that there is two
concurrent version of xmlbeans.

Stéphane_happy_to_help_and_happy_to_have_a_solution

-----Message d'origine-----
De : Kevin Krouse [mailto:kkrouse@bea.com] 
Envoyé : samedi 8 janvier 2005 01:48
À : user@xmlbeans.apache.org
Objet : RE: RE : newDOMNode trouble


Yep, looks like a bug.  I've created
http://issues.apache.org/jira/browse/XMLBEANS-99 to track the issue.

Thanks for providing the repro!

-----Original Message-----
From: Stéphane Rault [mailto:ksbrault@yahoo.fr] 
Sent: Friday, January 07, 2005 5:41 AM
To: user@xmlbeans.apache.org
Subject: RE : newDOMNode trouble

Yes : here is a file which cause me trouble : 

<?xml version="1.0" encoding="ISO-8859-1"?>
<dummy xmlns="http://dufourrault"
       xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" 
       xsi:SchemaLocation="dummy.xsd">


    <father>
        <son>toto</son>
    </father>
    
 </dummy>

And the associated schema

<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema targetNamespace="http://dufourrault"
    xmlns:dr="http://dufourrault"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">

    <xs:element name="dummy">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="father" type="dr:father"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

        <xs:complexType name="father">
            <xs:sequence>
                <xs:element name="son" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
</xs:schema>

TIA

Stéphane.


-----Message d'origine-----
De : Kevin Krouse [mailto:kkrouse@bea.com] 
Envoyé : jeudi 6 janvier 2005 20:14
À : user@xmlbeans.apache.org; Franco Lazzarino
Objet : 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@gmail.com] 
Sent: Thursday, January 06, 2005 8:31 AM
To: user@xmlbeans.apache.org
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 <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.ja
> > va: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(XmlObjectBa
> > se.java:154)
> >
> >    at 
> > org.apache.xmlbeans.impl.values.XmlObjectBase.newDomNode(XmlObjectBa
> > se.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


---------------------------------------------------------------------
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


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org