有没有CPAN模块或代码片段可以在不使用regExp的情况下用于修改本地HTML文件?
我想做的事情:
- Change the start tag ( example :
<div>
to<div id="newtag">
) - Add a tag before another ( example :
</head>
to<script type="text/javascript"> ...</script></head>
- Remove tags
- Read the content of a given tag. (<- ok this can be done with an XML / HTML parser.