I have an XML with lots of unordered tags. Some of the attributes in XML require to be renamed. I have tried using XML::XSLT. Although I am able to generate the desired output, it takes a lot of time. Another problem is that the program gets stuck if XML is huge. Is any other way to generate the desired XML in Perl.
When you say "some of the attributes in XML require to be renamed", do you mean that you want to go from this:
<ELEMENT ATTRIB="Foo">Data</ELEMENT>
to this:
<ELEMENT RENAMED="Foo">Data</ELEMENT>
If the above is the kind of transformation you want, you could just use the classic Perl search and replace one-liner:
perl -p -i -e 's/ATTRIB/RENAMED/g' *.html
I don't often use XSLT for things like this. Yes, you will need to XSLT someday, but if all you're doing is renaming tags, you might be able to get away with using plain old Perl.