Hi Jouko

Refer the piece of code given below.

Document doc=new DocumentImpl();
Element ele=(Element)doc.createElement("foo");
ele.appendChild(doc.createTextNode("bar"));
doc.appendChild(ele);

Hope this help.

Cheers,
Arun

> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Date: Mon, 27 Aug 2001 16:27:44 +0300
> From: Jouko Johansson <[EMAIL PROTECTED]>
> X-Accept-Language: en
> To: Xerces <[EMAIL PROTECTED]>
> Subject: Newbie question: how to create a node?
> Content-Transfer-Encoding: 7bit
> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> 
> Hi
> 
> I'm planning to create dynamically XML from the JSP-page, so I need
> information about how to create the Node, with specific values.
> 
> I'd like to have following kind of nodes created:
> <foo>bar</foo>
> 
> The 'bar'-section is treated as a text node, how do i create it?
> 
> 'foo'-section is a simple node with the name of 'foo', but how do I 
> set the node name?
> 
> The another solution is to create the xml file first, but this should be 
> avoided 'cos of I/O delays.
> 
> Thank you in advance...
> 
> Yours 
> 
> Jouko Johansson
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to