Re: Delete last 15 chars from a file

From: Date: Thu, 03 Mar 2005 06:53:22 +0000
Subject: Re: Delete last 15 chars from a file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-209885@lists.php.net to get a copy of this message
Shaun wrote:
Hi, I am trying to create an XML file, it will be done in stages so if the file isn't present I will add the line: <?xml version="1.0" ?>
    <root_element>
Then for each line I add I add the following
        <child_element>data<child_element>
But for various reasons the application won't know when the file is complete so it won't have the final:
    </root_element>
To solve this I intend to add the following each time
        <child_element>data<child_element>
    </root_element>
Any reason you aren't using the DOMXML functions, or other similar functionality for XML creating/parsing?

« previous php.general (#209885) next »