Hi, sorry for the late response.
On Wednesday 28 Apr 2010 20:12:36 Trev wrote: > 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. Please look into either http://search.cpan.org/dist/XML-LibXML/ along with its XPath and namespace capabilities or alternatively use XSLT and: http://search.cpan.org/dist/XML-LibXSLT/ . I don't think XML-Simple can handle namespaces very well, and I always recommend against it anyway. Regards, Shlomi Fish > > <?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> -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ What does "Zionism" mean? - http://shlom.in/def-zionism God considered inflicting XSLT as the tenth plague of Egypt, but then decided against it because he thought it would be too evil. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/