Re: [PHP] php newbie question with xml files

2005-05-04 Thread Jason Barnett
PHP5: http://php.net/manual/en/ref.dom.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php newbie question with xml files

2005-05-04 Thread disguised.jedi
> I have an xml document storing some data I need. What I want to do is this: > 1. Scan to the end of the file. > 2. Find the closing tag. > 3. Insert a new entry in before the closing tag. There are specific classes and functions in the PHP core that can help you do just this. > I've tried: > 1.

Re: [PHP] php newbie question with xml files

2005-05-04 Thread Mark Cain
_data; or a little more succinctly $my_data = "foo bar"; $new_data = preg_replace('/(.*)(<\/.*>)$/i', '$1' . $my_data . '$2', file_get_contents('./test.txt')); echo $new_data; Mark Cain - Original Message ----- From: "Jared Sherman&

Re: [PHP] php newbie question with xml files

2005-05-04 Thread Mark Cain
_data; or a little more succinctly $my_data = "foo bar"; $new_data = preg_replace('/(.*)(<\/.*>)$/i', '$1' . $my_data . '$2', file_get_contents('./test.txt')); echo $new_data; Mark Cain - Original Message ----- From: "Jared Sherman&

[PHP] php newbie question with xml files

2005-05-02 Thread Jared Sherman
I have an xml document storing some data I need. What I want to do is this: 1. Scan to the end of the file. 2. Find the closing tag. 3. Insert a new entry in before the closing tag. I've tried: 1. Creating new files and renaming them to be the original. 2. Writing the file to a dummy file and inse