/[suikacvs]/markup/html/whatpm/Whatpm/XMLParser.pm
Suika

Contents of /markup/html/whatpm/Whatpm/XMLParser.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Aug 11 07:19:18 2007 UTC (17 years, 2 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
++ whatpm/Whatpm/ChangeLog	11 Aug 2007 07:19:02 -0000
	* HTML.pm.src: |or|s for insertion modes are replaced
	by |&|s.

2007-08-11  Wakaba  <wakaba@suika.fam.cx>

1 package Whatpm::XMLParser;
2
3 ## Just a wrapper for XMLParserTemp for now.
4
5 sub parse_string ($$$;$) {
6 require Encode;
7 my $s = Encode::encode ('utf8', $_[1]);
8 open my $fh, '<', \$s;
9 return $_[0]->parse_byte_stream ($fh => $_[2], $_[3], charset => 'utf8');
10 } # parse_string
11
12 sub parse_byte_stream ($$$;$%) {
13 my $onerror = $_[3] || sub { };
14 my %opt = @_[4..$#$_];
15 require Message::DOM::XMLParserTemp;
16 return Message::DOM::XMLParserTemp->parse_byte_stream
17 ($_[1] => $_[2]->implementation, $onerror,
18 charset => $opt{charset});
19 } # parse_byte_stream
20
21 1;
22 ## $Date:$

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24