Title: Message
Hi Savita,
 
  After parsing the file you will get the Document Object. You have to create the nodes or elements using this document object only. Otherwise you cannot add the nodes to this document . It simply throws Exception. There are some standrard methods avaliable to convert Document object to String. Search on web.
 
regards,
Sridhar
-----Original Message-----
From: Savita [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 9:36 AM
To: [EMAIL PROTECTED]
Subject: Inserting a node

Hi ,

I have a XML file like this
<MAP>
<ROOT>CUSTOMER_MSG</ROOT>
<PRIMARY>OS_CUST_ID</PRIMARY>
<GROUP>
<GROUP_NAME>CUSTOMER</GROUP_NAME>
<TABLE>
<TABLE_NAME>OS_CUSTOMER</TABLE_NAME>

<FIELD>
<FIELD_NAME>FIRST_NAME</FIELD_NAME>
<FIELD_TYPE>NVARCHAR</FIELD_TYPE>
</FIELD>

<FIELD>
<FIELD_NAME>LAST_NAME</FIELD_NAME>
<FIELD_TYPE>NVARCHAR</FIELD_TYPE>
</FIELD>

<FIELD>
<FIELD_NAME>CONTACT_TYPE</FIELD_NAME>
<FIELD_TYPE>CHAR</FIELD_TYPE>
</FIELD>

<FIELD>
<FIELD_NAME>ADDRESS_1</FIELD_NAME>
<FIELD_TYPE>NVARCHAR</FIELD_TYPE>
</FIELD>

<FIELD>
<FIELD_NAME>ADDRESS_2</FIELD_NAME>
<FIELD_TYPE>NVARCHAR</FIELD_TYPE>
</FIELD>

<FIELD>
<FIELD_NAME>ADDRESS_3</FIELD_NAME>
<FIELD_TYPE>NVARCHAR</FIELD_TYPE>
</FIELD>

<FIELD>
<FIELD_NAME>ADDRESS_4</FIELD_NAME>
<FIELD_TYPE>NVARCHAR</FIELD_TYPE>
</FIELD>
</TABLE>
</GROUP>
</MAP>

I am converting it in to an XML document.I am getting some value dynamically and then after each FIELD_TYPE tag I want to insert two tag and values like<OSP_TABLE_NAME> and <OSP_FIELD_NAME>.I am able to create the node but not able to insert the node.And after inserting the node how do I get the l document back in to an xml file with this two tags added in it.

Any pointer to this will be really helpfull for me.

Thanks and Regards
Savita.

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

Reply via email to