Test it : el.setNodeValue( "bar"); best regards;
-----Message d'origine----- De : JEFF EMMINGER [mailto:[EMAIL PROTECTED] Envoyé : jeudi 26 février 2004 16:37 À : '[EMAIL PROTECTED]' Objet : xml document always null? hi all, i'm trying to create an xml document but all i get for output is el.toString = [foo: null] el.getNodeValue = null can anyone see what i'm doing wrong? [code] import javax.xml.parsers.DocumentBuilder; import org.apache.soap.util.xml.XMLParserUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; public class XmlTest { public static void main(String[] args) { DocumentBuilder db = XMLParserUtils.getXMLDocBuilder(); Document doc = db.newDocument(); Element el = doc.createElement("foo"); el.appendChild( doc.createTextNode("bar") ); System.out.println("el.toString = " + el.toString()); System.out.println("el.getNodeValue = " + el.getNodeValue()); } } [/code] CONFIDENTIAL NOTICE: This email including any attachments, contains confidential information belonging to the sender. It may also be privileged or otherwise protected by work product immunity or other legal rules. This information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this emailed information is strictly prohibited. If you have received this email in error, please immediately notify us by reply email of the error and then delete this email immediately.