develooper Front page | perl.beginners | Postings from April 2010

XML Replace

Thread Next
From:
Trev
Date:
April 29, 2010 01:19
Subject:
XML Replace
Message ID:
745aa3e5-9f15-47ab-ad1b-3df2cba5f7e2@p17g2000vbe.googlegroups.com
I'm trying to use Perl to replace a line in a few XML files I have.

Example XML below, I'm wanting to change the Id= part from  Id="/Local/
App/App1" to Id=/App1". I know there's an easy way to do this with
perl alone however I'm trying to use XML::Simple or any XML plugin for
perl.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

<Profile xmlns="xxxxxxxxx" name="" version="1.1" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance">


	<Application Name="App1" Id="/Local/App/App1" Services="1" policy=""
StartApp="" Bal="5" sessInt="500" WaterMark="1.0"/>


<AppProfileGuid>586e3456dt</AppProfileGuid>

</Profile>


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About