PHP with XML

Hey guys. how u doing?

Please i need some help with my project. I must make a program that take 2 or more xml files ( THAT I DONT KNOW THEIR CONTENT ) and then join them into one file. I must load those files one by one then when i click join it will join them.

The code of the program is based on PHP. And i am not able to get some results by myself.

The idea is if i have as an example those 2 XML files :

File1:

<?xml version='1.0' standalone='yes'?>
<movies>
<movie>
<title>PHP: Behind the Parser</title>
<characters>
<character>
<name>Ms. Coder</name>
<actor>Onlivia Actora</actor>
</character>
<character>
<name>Mr. Coder</name>
<actor>El Act</actor>
</character>
</characters>
<movie>
<movies>

File 2:

<?xml version='1.0' standalone='yes'?>
<movies>
<movie>
<plot>
So, this language. It's like, a programming language. Or is it a
scripting language? All is revealed in this thrilling horror spoof
of a documentary.
</plot>
<great-lines>
<line>PHP solves all my web problems</line>
</great-lines>
<rating type="thumbs">7</rating>
<rating type="stars">5</rating>
</movie>
</movies>

The result will be:

<?xml version='1.0' standalone='yes'?>
<movies>
<movie>
<title>PHP: Behind the Parser</title>
<characters>
<character>
<name>Ms. Coder</name>
<actor>Onlivia Actora</actor>
</character>
<character>
<name>Mr. Coder</name>
<actor>El Act</actor>
</character>
</characters>
<plot>
So, this language. It's like, a programming language. Or is it a
scripting language? All is revealed in this thrilling horror spoof
of a documentary.
</plot>
<great-lines>
<line>PHP solves all my web problems</line>
</great-lines>
<rating type="thumbs">7</rating>
<rating type="stars">5</rating>
</movie>
</movies>

I am really thankfull for any help . Maybe u can put me on the way so i can continue myself this program.

Please reply ASAP.

THANKS AGAIN.

MOD EDIT: Added code tags

Do you have them parsed in PHP? Or is that the problem?

It is my primary problem actually… i dont know how to parse it.
plz reply ASAP! thx.

It will be better if u give me a code that can compare 2 xml files…
but plz hurry up … i have to give this project this friday at 7.30am!
thx.

I hate to say it but asking for someone to GIVE you the code and then RUSHING them along is not how we do business at phpHELP.com (Note the EMPHASIS )

If you have code that you want us to Look at to HELP you figure it out, we would be happy to. If you have a Project that you want us to DO for you, well that’s a different story… I haven’t gotten the “PHPHELP for PAY” section up yet, but I am considering it.

Please note this is an ALL VOLUNTEER site. No one here gets paid. Even the meager donations that Do come in don’t pay for the expenses involved in maintaining the site. (Equipment, registration, fees, connections, etc…) To expect a “RAPID REPLY” when you have done very little to help yourself (and to expect it gratis as well), is not what this site is about.

Sorry if that’s what you are expecting.

Sponsor our Newsletter | Privacy Policy | Terms of Service