kaancho12
Technical User
- Feb 22, 2005
- 191
hi,
I have this problem of parsing html file and i need some suggestions on how to go about it. i have to parse lots of html files and add some contents at specific point in those files.
for example the files might look like this:
<html>
<head></head><body>
<table>
<tr><td>TestA<A HREF="ABC16.html">ABC16</A></td></tr>
<tr><td>Test B<A HREF="ABC17.html">ABC17</A></td></tr>
<tr><td>Test C<A HREF="ABC18.html">ABC18</A></td></tr>
<tr><td>Some text in between and some other tags <b>tags</b></td></tr>
<tr><td>Test D<A HREF="qwe19.html">qwe19</A></td></tr>
<tr><td>Test E<A HREF="rst20.html">rst20</A></td></tr>
</table>
</body>
</html>
Now, I have to add a button after each of the link that starts with "ABC" and that button has to go that specific page. Say if the link name is ABC16.html I want to add a button which is like
<input TYPE="BUTTON" NAME="b1" VALUE="Click Here To Order" onClick="Locat('webaddress');return false">
I need help on how to find links that start with "ABC" and how to add a button after that link is finished. Any suggestions??? There are a lot of files otherwise i would do this manually
)
thank you
ko12
I have this problem of parsing html file and i need some suggestions on how to go about it. i have to parse lots of html files and add some contents at specific point in those files.
for example the files might look like this:
<html>
<head></head><body>
<table>
<tr><td>TestA<A HREF="ABC16.html">ABC16</A></td></tr>
<tr><td>Test B<A HREF="ABC17.html">ABC17</A></td></tr>
<tr><td>Test C<A HREF="ABC18.html">ABC18</A></td></tr>
<tr><td>Some text in between and some other tags <b>tags</b></td></tr>
<tr><td>Test D<A HREF="qwe19.html">qwe19</A></td></tr>
<tr><td>Test E<A HREF="rst20.html">rst20</A></td></tr>
</table>
</body>
</html>
Now, I have to add a button after each of the link that starts with "ABC" and that button has to go that specific page. Say if the link name is ABC16.html I want to add a button which is like
<input TYPE="BUTTON" NAME="b1" VALUE="Click Here To Order" onClick="Locat('webaddress');return false">
I need help on how to find links that start with "ABC" and how to add a button after that link is finished. Any suggestions??? There are a lot of files otherwise i would do this manually
thank you
ko12