I'm brand new to PHP, so I apologize if this is a really stupid question. I'm working on an android application that uses XML that is stored online. The client has a page that uses PHP to write to the XML file. Currently, I have a .xml file that contains all of the data that the program needs, but when I append to it I'm unable to close the root tag. My professor told me to use php to call a unix command (pretty sure the "cat" command) to write the following to a file. "<AllCards>", $cards.xml, "</AllCards>" and then save the file as allcards.xml.
Here is some example input and output of what I want to do.
Input (cards.xml):
Code: Select all
<FlashCard>
<name> Card Name </name>
<description> Description goes here </description>
<chapter> 10 </chapter>
<picture> URL to Picture </picture>
<sound> URL to sound </sound>
</FlashCard>
Code: Select all
<AllCards>
<FlashCard>
..
</FlashCard>
</AllCards>