I have a sample XML file and want to use Xquery to insert data into the nodes
<Employees>
<ID>1</ID>
<Company>Northwind Traders</Company>
<Last_x0020_Name>Freehafer</Last_x0020_Name>
<First_x0020_Name>Nancy</First_x0020_Name>
<E-mail_x0020_Address>[email protected]</E-mail_x0020_Address>
<Job_x0020_Title>Sales Representative</Job_x0020_Title>
<Business_x0020_Phone>(123)555-0100</Business_x0020_Phone>
<Home_x0020_Phone>(123)555-0102</Home_x0020_Phone>
<Fax_x0020_Number>(123)555-0103</Fax_x0020_Number>
<Address>123 1st Avenue</Address>
<City>Seattle</City>
<State_x002F_Province>WA</State_x002F_Province>
<ZIP_x002F_Postal_x0020_Code>99999</ZIP_x002F_Postal_x0020_Code>
<Country_x002F_Region>USA</Country_x002F_Region>
<Web_x0020_Page>#http://northwindtraders.com#</Web_x0020_Page>
</Employees>
How would I be able to insert more XML below the current file for example:
<Employees>
<ID>2</ID>
<Company>Another Company</Company>
</Employees
I have tried the following but can't figure it out.
insert nodes <ID>2</ID> after
doc("Employees.xml")//Employees
insert nodes... did you get an error? If so, what did it say? Also, which XQuery processor (and do you know for sure that it supports XQuery Update syntax)?