adding elements to xml file

From: Date: Sat, 03 Jul 2004 21:20:14 +0000
Subject: adding elements to xml file
Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-406@lists.php.net to get a copy of this message
Hello I'm having hard time adding elements to xml file. I'm useing php 4.3 and trying to xml dom dump_file function, but it says can't access file. I allso havent found any tutorial of that from net so perhaps somebody can explayn it here or knows any article of that. My xml file is like that: ================================ <?xml version="1.0" encoding="ISO-8859-1"?> <people>
    <one nr="1">
        <name>Tom</name>
        <sex>M</sex>
    </one>
    <one nr="2">
        <name>Mary</name>
        <sex>F</sex>
    </one>
</people> ================================= and lets say i want to add "one element nr 3" after last "one" like thiat: <one nr="3">
      <name>Jane</name>
      <sex>F</sex>
</one> Thnx

« previous php.xml.dev (#406) next »