Sinister has asked for the wisdom of the Perl Monks concerning the following question:
<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE page SYSTEM "entities.dtd"> <form> <method>POST</method> <action>/cgi/process.cgi</action <input> <type>text</type> <name>name1</name> <required>0</required> <value></value> <comment>This field is not required.</comment> </input> <input> <type>text</type> <name>name3</name> <required>1</required> <value></value> <comment>Put three words here!</comment> <test> my @tmp = split(/\ /, shift()); return 1 if ( $#tmp == 2 ); return 0; </test> </input> </form>
This cannot be the purpose of libXML, and it surely is pretty expensive....$string = $dom->toString; $string =~ s/<\/form>//gim; $string .= "<info><failure>blah</failure></info>\n</form>\n"; $dom = $parser->parse_string($string);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::LibXML problem...
by lestrrat (Deacon) on Mar 08, 2002 at 20:05 UTC |