Parsing of HTML MAP sections

Discussions related to Visual Prolog
User avatar
Ferenc Nagy
VIP Member
Posts: 216
Joined: 24 Apr 2007 12:26

Parsing of HTML MAP sections

Unread post by Ferenc Nagy » 23 Aug 2016 10:56

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?
TIA, Regards,
Frank Nagy

User avatar
Thomas Linder Puls
VIP Member
Posts: 1158
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 23 Aug 2016 18:41

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.
Regards Thomas Linder Puls

Post Reply