0 Replies Latest reply on Dec 6, 2007 2:38 PM by evsPeart

    write in XML Files???

    evsPeart Level 1
      Hi,

      I have this XML File:

      <?xml version="1.0" encoding="UTF-8"?>
      <galleries>
      <gallery id="flextravel">
      <description>Trip photos from various Flex team members</description>
      <photo>
      <name>Acropolis: Matt Chotin</name>
      <description>Acropolis on Calton Hill in Edinburgh</description>
      <source>flextravel/Acropolis on Calton Hill.jpg</source>
      </photo>
      <photo>
      <name>Edinburgh Castle: Matt Chotin</name>
      <description>The Edinburgh Castle as seen from fountain in the Princess Gardens</description>
      <source>flextravel/Fountain and Edinburgh Castle.jpg</source>
      </photo>
      <photo>
      <name>Almafi: Anton de Young</name>
      <description>The town of Amalfi at night</description>
      <source>flextravel/amalfi.jpg</source>
      </photo>
      <photo>
      <name>Almafi: Anton de Young</name>
      <description>Amalfi buildings in evening light</description>
      <source>flextravel/amalfi-bw.jpg</source>
      </photo>
      <photo>
      <name>Ravello: Anton de Young</name>
      <description>From Ravello looking east toward Minori</description>
      <source>flextravel/ravello.jpg</source>
      </photo>
      <photo>
      <name>Hoover Dam: Ashish Goyal</name>
      <description>View of Colorado river from top of the Hoover Dam</description>
      <source>flextravel/hoover-dam.jpg</source>
      </photo>
      <photo>
      <name>Pueblo: Hal Lichtin</name>
      <description>Looking up inside Wupatki pueblo, Wupatki National Monument, Arizona</description>
      <source>flextravel/Pueblo.jpg</source>
      </photo>
      <photo>
      <name>Watchtower: Hal Lichtin</name>
      <description>Detail of exterior of Mary Colter's Desert View Watchtower, Grand Canyon National Park, Arizona</description>
      <source>flextravel/Watchtower.jpg</source>
      </photo>
      <photo>
      <name>Abandoned Car: Kari White</name>
      <description>Iquique, Chile</description>
      <source>flextravel/abandoned car.jpg</source>
      </photo>
      <photo>
      <name>Shades: Kari White</name>
      <description>Playa Hermosa, Costa Rica</description>
      <source>flextravel/shades.jpg</source>
      </photo>
      <photo>
      <name>Eiffel Tower: Mac Martine</name>
      <description>Eiffel Tower, Paris</description>
      <source>flextravel/EiffelTower.jpg</source>
      </photo>
      <photo>
      <name>Panth�on: Mac Martine</name>
      <description>Panth�on (necropolis)</description>
      <source>flextravel/Pantheon.jpg</source>
      </photo>
      <photo>
      <name>Munich New Town Hall: Tom Ruggles</name>
      <description>Taken from the tower of St. Peter, this is a view of Munich's New Town Hall</description>
      <source>flextravel/MunichCityHall.jpg</source>
      </photo>
      <photo>
      <name>il Duomo: Tom Ruggles</name>
      <description>Aerial view of il Duomo in Florence as seen from the tower atop Hotel Torre Guelfa</description>
      <source>flextravel/ilDuomo.jpg</source>
      </photo>
      <photo>
      <name>Hippo: Sam Reuben</name>
      <description>Hippopotamus at the Bannerghatta National Park</description>
      <source>flextravel/Hippo.jpg</source>
      </photo>
      <photo>
      <name>Bengal Tiger: Sam Reuben</name>
      <description>Tiger at the Bannerghatta National Park on the Grand Safari</description>
      <source>flextravel/Regal_Bengal_tiger.jpg</source>
      </photo>
      <photo>
      <name>London Bridge: Tom Lane</name>
      <description>London Bridge</description>
      <source>flextravel/londonbridge.jpg</source>
      </photo>
      <photo>
      <name>Nepal: Tom Lane</name>
      <description>Bhaktapur, Nepal</description>
      <source>flextravel/nepal1.jpg</source>
      </photo>
      <photo>
      <name>Nepal: Tom Lane</name>
      <description>Bhaktapur, Nepal</description>
      <source>flextravel/nepal2.jpg</source>
      </photo>
      <photo>
      <name>Tuscany: Tom Lane</name>
      <description>Tuscany, Italy</description>
      <source>flextravel/tuscany.jpg</source>
      </photo>
      <photo>
      <name>Test: Evans Peart</name>
      <description>Africa Mia, Costa Rica</description>
      <source>flextravel/AF01.jpg</source>
      </photo>
      </gallery>

      </galleries>


      It have information about images, like name, source and description. I need to add more images with that information, how I can add more elements with out write the entire XML again???.

      I just want to go to the last line and add the new element in the XML File

      <photo>
      <name>New: New name</name>
      <description>New description</description>
      <source>flextravel/newphoto.jpg</source>
      </photo>


      With the new image information, how I can do it????

      Regards,
      evspeart