Recent

Author Topic: How to make a list of HTML tags?  (Read 9100 times)

Szymad

  • New Member
  • *
  • Posts: 12
How to make a list of HTML tags?
« on: August 01, 2010, 10:06:38 pm »
Hi,
Listen, I have a problem. I want to create a browser for the blind and those who have problems with reading. Browser can use the Internet Explorer engine to display pages, and read the text, which will send a special procedure.
I have a problem, however, and I can not imagine myself with it. The HTML tags are such <h1> ILLUSTRATIVE TEXT </ h1> or <img src="xx">. Need I list all the tags in the ListBox. One marker on one line. How can I do. I have downloaded HTML code memo, but I can upload it somewhere else. Please help. Sorry for my English - translated by Google Translator.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8552
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to make a list of HTML tags?
« Reply #1 on: August 02, 2010, 05:35:50 am »
AFAIK the chm package has fasthtmlparser unit. I never use it before, but it should help parsing those tags.

Szymad

  • New Member
  • *
  • Posts: 12
Re: How to make a list of HTML tags?
« Reply #2 on: August 02, 2010, 04:22:05 pm »
I don't know how to use a fasthtmlparser. I tried to use it. But there is second problem. I need to have plain text too.

See:

Code: [Select]
<h1 align="center">This is a header</h1>This is a text.
on list box i want to have:
<h1 align="center">This is a header</h1>
This is a text.

How to do this?

davesimplewear

  • Sr. Member
  • ****
  • Posts: 319
    • Davids Freeware
Re: How to make a list of HTML tags?
« Reply #3 on: August 03, 2010, 01:24:23 am »
one way would be to create a text file with your tags and then listbox.items.loadfromfile('whatever.txt');

Regards
Dave
All things considered insanity seems the best option

Leledumbo

  • Hero Member
  • *****
  • Posts: 8552
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to make a list of HTML tags?
« Reply #4 on: August 03, 2010, 06:59:33 am »
Quote
one way would be to create a text file with your tags and then listbox.items.loadfromfile('whatever.txt');
The OP wants to have each tag entity as one entry in listbox, that would take it line by line.
Quote
I don't know how to use a fasthtmlparser. I tried to use it. But there is second problem. I need to have plain text too.
So do I, AFAIR there's an example under fpc directory.

Szymad

  • New Member
  • *
  • Posts: 12
Re: How to make a list of HTML tags?
« Reply #5 on: August 03, 2010, 11:52:45 am »
Thanks! I'm very happy! tags are line per line! Super.

Szymad

  • New Member
  • *
  • Posts: 12
Re: How to make a list of HTML tags?
« Reply #6 on: August 03, 2010, 02:47:35 pm »
Not in every line. How to get text beetweent one tag?
Can u write simply code for me?

<h1>AA</h1> for example in GetTextFromTag(h1):string should be AA.

davesimplewear

  • Sr. Member
  • ****
  • Posts: 319
    • Davids Freeware
Re: How to make a list of HTML tags?
« Reply #7 on: August 03, 2010, 11:29:39 pm »
What type of control are using when you want insert the text into the tag, perhaps if you put the area of the code you are having a problem with someone might be able to help

Regards
Dave
All things considered insanity seems the best option

 

TinyPortal © 2005-2018