我需要将多个xml文件合并为一个xml文件。我认为这很容易,但我无法弄清楚。有没有这个工具(OSX)或我必须使用脚本?所有的xml文件都是这样的。有没有办法将这些与php结合成一个文件?将多个xml文件合并为单个xml文件
<?xml version="1.0"?>
<trcitem xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" availablefrom="2015-02-01T00:00:00" availableto="2015-02-08T00:00:00" trcid="2b7fde5b-56d7-4dc2-9b37-d8e5baa72ff3" createdby="[email protected]" creationdate="2015-02-01T13:23:57" lastupdated="2015-02-08T00:52:01" lastupdatedby="[email protected]" owner="VVV Altena Biesbosch Invoerders" wfstatus="approved" published="false" legalowner="[email protected]" lastimportedon="2015-02-01T13:23:58.023" deleted="false" offline="false" xmlns="http://www.vvvnederland.nl/XMLSchema/TrcXml/2.0">
<calendar excludeholidays="false">
<single date="07/02/2015">
<when timestart="19:00:00" />
</single>
</calendar>
<trcitemcategories>
<types>
<type catid="2.6.9">Gezelschap/orkest</type>
</types>
<soldout>false</soldout>
<canceled>false</canceled>
</trcitemcategories>
<media>
<file trcid="c4630ca2-ddef-41b7-a8f3-788cf59133d7" main="true">
<filename>da599797-a9a1-4620-80c8-592657d4e97f.jpg</filename>
<filetype>jpg</filetype>
<hlink>http://media.ndtrc.nl/Images/20150201/da599797-a9a1-4620-80c8-592657d4e97f.jpg</hlink>
<mediatype>photo</mediatype>
</file>
</media>
<trcitemdetails>
<trcitemdetail lang="de">
<calendarsummary>Samstag 7 Februar 2015, 19:00 Uhr.</calendarsummary>
<title>Jeugdmuziekdag Altena</title>
</trcitemdetail>
<trcitemdetail lang="en">
<calendarsummary>Saturday 7 February 2015, 19:00 hour.</calendarsummary>
<title>Jeugdmuziekdag Altena</title>
</trcitemdetail>
<trcitemdetail lang="fr">
<calendarsummary>Samedi 7 Février 2015, 19:00 heure.</calendarsummary>
<title>Jeugdmuziekdag Altena</title>
</trcitemdetail>
<trcitemdetail lang="nl">
<calendarsummary>Zaterdag 7 februari 2015, 19:00 uur.</calendarsummary>
<longdescription><p style="font-family: arial; font-size: 12px; line-height: 16px;">De Jeugdmuziekdag Altena wordt gehouden op 7 februari 2015 in &rsquo;t Verlaat in Almkerk. Tijdens deze dag speel je samen met andere muzikanten in &eacute;&eacute;n groot orkest en wordt er gewerkt aan een concertprogramma onder leiding van professionele dirigenten. Het thema is &ldquo;Movies Music&rdquo;.<br />
<br />
Elkemuzikant tot 21 jaar uit het Land van Heusden en Altena die een muziekinstrument bespeelt dat voorkomt in een HaFaBra-orkest, is welkom. Je hoeft niet per se lid te zijn van een muziekvereniging.<br />
<br />
De opgaveatum sloot op 24-12-2014</p>
<p style="font-family: arial; font-size: 12px; line-height: 16px;">Het slotconcert begint om 19:00 uur en daarvoor is de entree gratis.</p></longdescription>
<shortdescription>één groot orkest </shortdescription>
<title>Jeugdmuziekdag Altena</title>
</trcitemdetail>
<trcitemdetail lang="it">
<calendarsummary>Sabato 7 febbraio 2015, 19:00 Ora.</calendarsummary>
<title>Jeugdmuziekdag Altena</title>
</trcitemdetail>
<trcitemdetail lang="es">
<calendarsummary>Sábado 7 Febrero 2015, 19:00 Hora.</calendarsummary>
<title>Jeugdmuziekdag Altena</title>
</trcitemdetail>
</trcitemdetails>
<location>
<address>
<physical giscoordinateType="points">
<city>ALMKERK</city>
<country>NL</country>
<housenr>1</housenr>
<street>'t Verlaat </street>
<zipcode>4286</zipcode>
<giscoordinates>
<giscoordinate>
<xcoordinate>4,957688</xcoordinate>
<ycoordinate>51,769918</ycoordinate>
</giscoordinate>
</giscoordinates>
<xcoordinate>4,957688</xcoordinate>
<ycoordinate>51,769918</ycoordinate>
</physical>
</address>
<actor availablefrom="2015-02-01T13:23:57" createdby="[email protected]" creationdate="2015-02-01T13:23:57" trcid="13862988-5229-45a3-8500-214421ed1a02" lastupdated="2015-02-01T13:23:57" lastupdatedby="[email protected]" owner="Systeembeheerders">
<actordetails>
<actordetail lang="nl">
<title>'t Verlaat</title>
</actordetail>
</actordetails>
<contactinfo>
<address>
<physical>
<city>ALMKERK</city>
<country>NL</country>
<housenr>1</housenr>
<street>'t Verlaat </street>
<zipcode>4286</zipcode>
<giscoordinates>
<giscoordinate>
<xcoordinate>4,957688</xcoordinate>
<ycoordinate>51,769918</ycoordinate>
<label>'t Verlaat 1, 4286 ALMKERK, NL</label>
</giscoordinate>
</giscoordinates>
</physical>
</address>
</contactinfo>
</actor>
</location>
<userorganisation>VVV Altena Biesbosch</userorganisation>
</trcitem>
如果您想要一个有效的答案,您将需要添加更多细节。你目前有什么代码?什么平台,你在用什么语言?源xml的外观如何?组合的xml应该如何查看? – 2015-02-10 20:53:17
Soryy如果它不清楚的问题。 Thougt很简单。我有一个zip文件,里面有很多xml文件。这些文件代表事件。而不是导入所有这些单个XML文件。我想将它们合并到一个文件并导入。 – Toasty 2015-02-10 22:19:33
那么,平台/操作系统呢?你想使用的编程语言怎么样?试图提供答案时,这些事情很重要! – 2015-02-10 22:28:20