0

我有一个示例 XML 文件并想使用 Xquery 将数据插入节点

<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>nancy@northwindtraders.com</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>

我如何能够在当前文件下方插入更多 XML,例如:

<Employees>
<ID>2</ID>
<Company>Another Company</Company>
</Employees

我已经尝试了以下但无法弄清楚。

insert nodes <ID>2</ID> after 
doc("Employees.xml")//Employees
4

0 回答 0