causer1984
IS-IT--Management
Does anyone know how to append to an XML file while still enclosing it in a <master tag>?
becomes
Because it is safe-perl, I cannot include modules. I would know the exact length of the closing tag (</entries>) and so it would be a case of just appending to the XML file then seeking backwards a set number of bytes. The function fseek might be the function I need, but I cannot figure out how to use it.
Any help appreciated
Code:
<entries>
<entry1 />
<entry2 />
</entries>
becomes
Code:
<entries>
<entry1 />
<entry2 />
<entry3 />
</entries>
Because it is safe-perl, I cannot include modules. I would know the exact length of the closing tag (</entries>) and so it would be a case of just appending to the XML file then seeking backwards a set number of bytes. The function fseek might be the function I need, but I cannot figure out how to use it.
Any help appreciated