Re: [PHP] php newbie question with xml files

2005-05-04 Thread Mark Cain
; $new_data = preg_replace('/(.*)(\/.*)$/i', '$1' . $my_data . '$2', file_get_contents('./test.txt')); echo $new_data; Mark Cain - Original Message - From: Jared Sherman [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, May 03, 2005 2:00 AM Subject: [PHP] php newbie question with xml

Re: [PHP] php newbie question with xml files

2005-05-04 Thread Mark Cain
; $new_data = preg_replace('/(.*)(\/.*)$/i', '$1' . $my_data . '$2', file_get_contents('./test.txt')); echo $new_data; Mark Cain - Original Message - From: Jared Sherman [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, May 03, 2005 2:00 AM Subject: [PHP] php newbie question with xml

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 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

[PHP] php newbie question with xml files

2005-05-03 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