http://www.perlmonks.org/
http://localhost/w3c-markup-validator/
-//W3C//DTD HTML 4.0 Transitional//EN
utf-8
false
59
11
66
document type does not allow element "LINK" here
14
41
document type does not allow element "LINK" here
21
4
document type does not allow element "META" here
0
No Character Encoding Found!
Falling back to
UTF-8.
####
my $ua = LWP::UserAgent->new();
my $response = $ua->request($request);
my $parser = XML::LibXML->new();
my $doc = $parser->parse_string($response->content);
Kube::Demonize::logmsg($response->content);
#for (my $i = 0; $i < @errorlist; $i++) {
# Kube::Demonize::logmsg(sprintf("%s\n", $errorlist[$i]->getElementsByTagName('m:line')->textContent));
#}
foreach my $d ($doc->getElementsByTagName('m:doctype')) {
print $d->textContent;
}
foreach my $d ($doc->getElementsByTagName('m:validity')) {
print $d->textContent;
}
foreach my $d ($doc->getElementsByTagName('m:charset')) {
print $d->textContent;
}
####
@errors[0] = %error(
line=>120,
col=>2,
message=>'Tag not allowed');
@errors[1] = %error(
line=>220,
col=>3,
message=>'Another error?');