merge 2 xml documents: big challenge?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • merge 2 xml documents: big challenge?

    i use apache server and php 4.
    i have 1 main 'allDirectories' directory, with a few subdirectories inside. in each subdir we find 1 XML file ('data.xml').
    i want to be able to pick all 'data.xml' and merge them to 1 XML file.
    i do not need for the moment to read the data inside these XML files, i just need one 'big' XML (i thought i would transform my xml into arrays, then push them, but i did not work it out!!!).
    the amount and the name of the subdirectories are not predefined and will change with the time.
    i hope someone could help!

  • #2
    Uh... just physically merging them into one file shouldn't be a problem using opendir, fopen, fread, and fwrite.

    If you need to search the subdirectories recursively, TBT's snippet demonstrating how to delete a directory tree might be useful.

    If you need to actually merge the data inside the files, XML is not really my area of expertise...

    Kommentar

    Lädt...
    X