Hi !
I have create and insert new Nodes in a an XML file.
But the type of Node depends on element defined in DTD file.
How to read the element type from a DTD file. and create a Node object of
specified type.
I am doing something similar.
Element new_elem = document_object.createElement ("elem_name");
new_elem.setNodeValue ("asaass");
new_elem.setAttribute ("name", "Computer Just Selected");
parent_node.appendChild (new_elem);
resulting XML file I get contains the Elment as following
<elem_name name="Computer Just Selected"/>
where is the Value of this Node.
<elem_name name="Computer Just Selected"/>asaass</elem_name>
Christian Geuer-Pollmann wrote:
> Hi
>
> try to element.appendChild(doc.createTextNode("Whatever you need"));
>
> --On Montag, 22. Oktober 2001 17:20 +0530 Shashank <[EMAIL PROTECTED]> wrote:
>
> > Hi !
> >
> > I am able to create a new Elment and add it to parent Node i want.
> >
> > I am also able set its atributes. but when I call setNodeValue, doesnt
> > work, I mean doesn' sets the value of this Node.
> >
> > how to do this
> >
> > take care,
> > Shashank
> >
> >
> > --
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]