|
RE : newDOMNode trouble: msg#00041text.xml.xmlbeans.user
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@xxxxxxx] Envoyé : jeudi 6 janvier 2005 20:14 À : user@xxxxxxxxxxxxxxxxxxx; 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@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.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@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 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Generated .jar files cause conflict: 00041, Radu Preotiuc-Pietro |
|---|---|
| Next by Date: | Help with validating a new instance: 00041, Brian Deep |
| Previous by Thread: | RE: newDOMNode troublei: 00041, Kevin Krouse |
| Next by Thread: | RE: Memory Leak Problems in v1.0.1 w/selectPath(): 00041, Jamie Zyskowski |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |