Page 1 of 1

Parsing of HTML MAP sections

Posted: 23 Aug 2016 10:56
by Ferenc Nagy
My next problem is the parsing of HTML MAP sections.
These maps look like this. (Shape may be RECT, POLYGON or CIRCLE. Target may be "_parent","_blank","_self","_top" or any user-defined frame. The coords may consist 3, 4, 6 or more integers for CIRCLE-s, RECTANGLE-s and POLYGON respectively.

Code: Select all

I need your help about the parsing of above input and store the result in the following facts.

Code: Select all

facts - saved %  2016.08.07.     map_name : string := "".      a:(string Name, string Shape, integer_list FetchingPoints, string Jump, string Target, string Title).
As you can see there are neglected properties of AREA-s, like alt="....".
The hardest task is the handling of double quotes during splitting the AREA lines to lists of {keyword, equal sign, optional doble quote,text,optional closing double quote} sequences.

Have you some samples or recommended library functions related to such parsing tasks?

Posted: 23 Aug 2016 18:41
by Thomas Linder Puls
PFC (Commercial Edition) has
  • web\xmlLite
  • windowsApi\msXML_API\msXML_DOM_API
They are both maps of Windows API's. With the xmlLite you will write code that traverse the file, the msXML_DOM_API parses an entire XML structure in one step and builds an internal Document Object Model (DOM) which you will then traverse/query afterwards.