我有两个xml文件.我需要将它们合并在一起,其中元素“myid”在两者之间匹配.请看一下这些示例文件……
@H_404_14@File1.xml:
<?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <data> <title>Title1</title> <description>Description1</description> <myid>1</myid> </data> <data> <title>Title2</title> <description>Description2</description> <myid>2</myid> </data> </catalog>
File2.xml:
<?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <data> <author>Author1</author> <date>12/34/5678</date> <myid>1</myid> </data> <data> <author>Author2</author> <date>87/65/4321</date> <myid>2</myid> </data> </catalog>
<?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <data> <title>Title1</title> <description>Description1</description> <myid>1</myid> <author>Author1</author> <date>12/34/5678</date> </data> <data> <title>Title2</title> <description>Description2</description> <myid>2</myid> <author>Author2</author> <date>87/65/4321</date> </data> </catalog>