C
CTowers
Hello,
I am trying to use DOM to parse through the following special file. It
is an XHTML file, but has some tags. The aim is to output the normal
html tags and namespaces, as is, but when a <student> tag is found,
call a function.
----------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<h1><center>Welcome to our Student list!</center></h1>
</head>
<body>
<studentrole>
<student>Jane Lee</student>
<student>Tom Keept</student>
</studentrole>
</body>
</html>
---------------------------------------------------------------
My problem is that I don't know how to deal with the DOCTYPE
declaration and the normal HTML tags... can these be parsed through
and outputted... because they aren't really nodes.
Is it possible to do what I am trying to do??
Any suggestions are welcome.
Thank you.
I am trying to use DOM to parse through the following special file. It
is an XHTML file, but has some tags. The aim is to output the normal
html tags and namespaces, as is, but when a <student> tag is found,
call a function.
----------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<h1><center>Welcome to our Student list!</center></h1>
</head>
<body>
<studentrole>
<student>Jane Lee</student>
<student>Tom Keept</student>
</studentrole>
</body>
</html>
---------------------------------------------------------------
My problem is that I don't know how to deal with the DOCTYPE
declaration and the normal HTML tags... can these be parsed through
and outputted... because they aren't really nodes.
Is it possible to do what I am trying to do??
Any suggestions are welcome.
Thank you.