Hi everybody,
I'm working on an HTML interpreter. I use the Visual Prolog to parse an HTML page :
<html>
<HEAD>
</HEAD>
<body bgcolor="blue">
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("html",[],
[t("head",[],
[]
),
t("body",[a("bgcolor","blue"],
[s("Hi! How are you?",
e("br",[]),
s("This is Yasuihsa Matsumura",
c("!-- This is a comment line--",
x("xmlemptytag",[])
]
)
]
)
]
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
I'm working on an HTML interpreter. I use the Visual Prolog to parse an HTML page :
<html>
<HEAD>
</HEAD>
<body bgcolor="blue">
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("html",[],
[t("head",[],
[]
),
t("body",[a("bgcolor","blue"],
[s("Hi! How are you?",
e("br",[]),
s("This is Yasuihsa Matsumura",
c("!-- This is a comment line--",
x("xmlemptytag",[])
]
)
]
)
]
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