Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This fails with "validity error : Validation failed: no DTD found !". Fair enough, there's no DTD. But I just want to check to see that tags are balanced and properly-constructed for some arbitrary segment of code. I tried using the SkipDTD flag, but it had no effect. Is there an easy way to validate small snippets of code in this way?use XML::LibXML; my $xml_string = "<test>Teststring</test>"; my $parser = XML::LibXML->new; $parser->validation(1); $parser->parse_string($xml_string);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Validating XHTML
by gube (Parson) on Apr 28, 2006 at 13:30 UTC | |
by Anonymous Monk on Apr 28, 2006 at 13:32 UTC | |
by davorg (Chancellor) on Apr 28, 2006 at 13:49 UTC | |
by dorward (Curate) on Apr 28, 2006 at 14:33 UTC | |
|
Re: Validating XHTML
by wazoox (Prior) on Apr 28, 2006 at 15:54 UTC | |
by Anonymous Monk on May 05, 2006 at 13:57 UTC | |
|
Re: Validating XHTML
by dorward (Curate) on Apr 28, 2006 at 13:31 UTC |