Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML & Prolog

Status
Not open for further replies.

dazulu

Programmer
Jan 15, 2004
1
CH
Hi everybody,

I'm working on an HTML interpreter. I use the Visual Prolog to parse an HTML page :

<html>
<HEAD>
</HEAD>
<body bgcolor=&quot;blue&quot;>
Hi! How are you? <br>
This is Yasu Matsumura.<br>
<!-- This is a comment line -->
<XmlEmptyTag />
</body>
</html>

and the above HTML text is converted to the following Prolog list:

[t(&quot;html&quot;,[],
[t(&quot;head&quot;,[],
[]
),
t(&quot;body&quot;,[a(&quot;bgcolor&quot;,&quot;blue&quot;)],
[s(&quot;Hi! How are you?&quot;),
e(&quot;br&quot;,[]),
s(&quot;This is Yasuihsa Matsumura&quot;),
c(&quot;!-- This is a comment line--&quot;),
x(&quot;xmlemptytag&quot;,[])
]
)
]
)
]

I want then to analyse this list to obtain information about the HTML page parsed, but as Prolog interpret it as a list of one element, I don't know how to handle it. Is there a possibility to analyse every single (or block of) character on by one ?

Any idea ?

Thank you,

DaZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top