How to remove HTML markup tags from the stream as it is read ?

C

Collin VanDyck

Victoria said:
How to remove HTML markup tags from the stream as it is read ?

Hi Victoria,

Your post was pretty sparse, but here's my attempt to answer..

As you are reading in characters from the stream, if you can assume that the
HTML is valid, well-formed XHTML, then this is a relatively easy task.

It's just a matter of figuring out if you are inside of < and > , or if you
are outside.

Create another output stream that you will write your results to.
Start parsing your input stream, and for each character you encounter:

if it is outisde of < and > then print it to the output stream
else
don't.

You are going to need to post more information about your problem, though,
if you need more direction than that. Posting what you have already
attempted is usually a very good way to elicit responses from the group.

-CV
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top