Hi ,

Shashank wrote:-
> 
>  Element new_elem = document_object.createElement ("elem_name");
>  new_elem.setNodeValue ("asaass");
>  new_elem.setAttribute ("name", "Computer Just Selected");
>  parent_node.appendChild (new_elem);
> 
>

        Element new_elem = document_object.createElement ("elem_name");
        Text element_value = document_object.createTextNode("asaass");
        
        new_elem.setAttribute ("name", "Computer Just Selected");
        new_elem.appendChild (element_value);
        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.
        Element Value is Text Node in DOM, so have to add the Text node to the 
elment node.
        
        
Cheers,
Arun

-------------
Sun Microsystem, Inc.
Ph: 91-80-2298989 -x87425.
        
        


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

Reply via email to