Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing an XML file

Status
Not open for further replies.

Zippeh

Programmer
Sep 24, 2002
56
GB
Hi there,

What's the easiest way for me to edit a couple of attribute values of an XML file using Perl?

Thanks!
 
XML::Simple (like its name implies) isn't too smart when differentiating between attributes and nested tags. Normally you'd use it to read an XML config file into a perl data structure, where this doesn't matter much. But you might find that what gets written out might not look quite the same as what was read in. But for simple XML structures it should work OK. Give it a try and see.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top