I need to display a non editable html page from a editable html page. For example.. if we take http://www.theserverside.com/index.html we can find many links to other pages/form submissions. My requirement is to read http://www.theserverside.com/index.html and strip off all links to the other pages and form submissions with out hurting images/style sheet display. I really appreciate any suggestions.
- Posted by: Prasad Rachakonda
- Posted on: May 05 2004 14:08 EDT
When I need to this kind of thing, I tend to use XSL.
You can use a utility like Tidy or JTidy to convert the target HTML to XHTML. Then, you can use XSL to manipulate (now XML compliant) HTML. For example, you can write templates to omit <a> tags, but retain their contents, and omit <form> tags and all their contents as well.