/[suikacvs]/markup/html/whatpm/Whatpm/HTML.html
Suika

Diff of /markup/html/whatpm/Whatpm/HTML.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by wakaba, Sun Nov 4 04:34:30 2007 UTC revision 1.8 by wakaba, Sun Nov 11 08:39:42 2007 UTC
# Line 25  Line 25 
25    
26          <li><a href="#error_reports">ERROR REPORTS</a></li>          <li><a href="#error_reports">ERROR REPORTS</a></li>
27          <li><a href="#to_do">TO DO</a></li>          <li><a href="#to_do">TO DO</a></li>
28            <li><a href="#dependency">DEPENDENCY</a></li>
29          <li><a href="#see_also">SEE ALSO</a></li>          <li><a href="#see_also">SEE ALSO</a></li>
30          <li><a href="#author">AUTHOR</a></li>          <li><a href="#author">AUTHOR</a></li>
31          <li><a href="#license">LICENSE</a></li>          <li><a href="#license">LICENSE</a></li>
# Line 50  Line 51 
51      warn $error{type}, &quot;\n&quot;;      warn $error{type}, &quot;\n&quot;;
52    };    };
53        
54    Whatpm::HTML-&gt;parse_string ($s =&gt; $doc, $onerror);    Whatpm::HTML-&gt;parse_char_string ($s =&gt; $doc, $onerror);
55        
56    ## Now, |$doc| is the DOM representation of |$s|.</pre>    ## Now, |$doc| is the DOM representation of |$s|.</pre>
57  <p>  <p>
# Line 72  Web Hypertext Application Technologies.< Line 73  Web Hypertext Application Technologies.<
73  <hr />  <hr />
74  <h1><a name="methods">METHODS</a></h1>  <h1><a name="methods">METHODS</a></h1>
75  <dl>  <dl>
76  <dt><strong><a name="item_parse_string">[<em>$doc</em> =] Whatpm::HTML-&gt;parse_string (<em>$s</em>, <em>$doc</em>[, <em>$onerror</em>]);</a></strong><br />  <dt><strong><a name="item_parse_char_string">[<em>$doc</em> =] Whatpm::HTML-&gt;parse_char_string (<em>$s</em>, <em>$doc</em>[, <em>$onerror</em>]);</a></strong><br />
77  </dt>  </dt>
78  <dd>  <dd>
79  Parse a string <em>$s</em> as an HTML document.  Parse a string <em>$s</em> as an HTML document.
# Line 119  from a string containing HTML document m Line 120  from a string containing HTML document m
120  <pre>  <pre>
121    use Whatpm::HTML;    use Whatpm::HTML;
122    use Whatpm::NanoDOM;    use Whatpm::NanoDOM;
123    my $doc = Whatpm::HTML-&gt;parse_string    my $doc = Whatpm::HTML-&gt;parse_char_string
124        ($s =&gt; Whatpm::NanoDOM::Document-&gt;new, $onerror);</pre>        ($s =&gt; Whatpm::NanoDOM::Document-&gt;new, $onerror);</pre>
125  </dd>  </dd>
 <p></p>  
 <dt><strong><a name="item_get_inner_html"><em>$s</em> = Whatpm::HTML-&gt;get_inner_html (<em>$node</em>[, <em>$onerror</em>]);</a></strong><br />  
 </dt>  
 <dd>  
 Return the HTML serialization of a DOM node <em>$node</em>.  
 </dd>  
 <dd>  
 <p>The first argument, <em>$node</em>, MUST be a DOM <code>Document</code>,  
 <code>Element</code>, or <code>DocumentFragment</code> node.</p>  
 </dd>  
 <dd>  
 <p>The second argument, <em>$onerror</em>, MUST be a reference to the  
 error handling code.  This code will be invoked if a descendant  
 of <em>$node</em> is neither of <code>Element</code>, <code>Text</code>, <code>CDATASection</code>,  
 <code>Comment</code>, <code>DocumentType</code>, nor <code>EntityReference</code>, so  
 that an <code>INVALID_STATE_ERR</code> exception MUST be thrown.  
 The code will be invoked with an argument, which is the node  
 whose type is invalid.    
 The argument <em>$onerror</em> is optional; if missing, any erroneous  
 node is simply ignored.</p>  
 </dd>  
 <dd>  
 <p>The method returns a reference to the <code>inner_html</code> attribute  
 value, i.e. the HTML serialization of the <em>$node</em>.</p>  
 </dd>  
126  <p></p></dl>  <p></p></dl>
127  <p>  <p>
128  </p>  </p>
# Line 176  Whatpm Error Types &lt;http://suika.fam. Line 152  Whatpm Error Types &lt;http://suika.fam.
152  </p>  </p>
153  <hr />  <hr />
154  <h1><a name="to_do">TO DO</a></h1>  <h1><a name="to_do">TO DO</a></h1>
155    <p>Documentation for parse_byte_string.</p>
156  <p>Tokenizer should emit a sequence of character tokens as one token  <p>Tokenizer should emit a sequence of character tokens as one token
157  to improve performance.</p>  to improve performance.</p>
158  <p>A method that accepts a byte stream as an input.</p>  <p>A method that accepts a byte stream as an input.</p>
# Line 185  to improve performance.</p> Line 162  to improve performance.</p>
162  <p>  <p>
163  </p>  </p>
164  <hr />  <hr />
165    <h1><a name="dependency">DEPENDENCY</a></h1>
166    <p>This module requires <em>Error</em>.  That module is available at CPAN
167    &lt;http://search.cpan.org/author/SHLOMIF/Error-0.17009/lib/Error.pm&gt;.
168    It is also part of manakai-core distribution
169    &lt;http://suika.fam.cx/www/2006/manakai/&gt;.</p>
170    <p>
171    </p>
172    <hr />
173  <h1><a name="see_also">SEE ALSO</a></h1>  <h1><a name="see_also">SEE ALSO</a></h1>
174  <p>Whatpm &lt;http://suika.fam.cx/www/markup/html/whatpm/readme&gt;.</p>  <p>Whatpm &lt;http://suika.fam.cx/www/markup/html/whatpm/readme&gt;.</p>
175  <p>Whatpm Error Types  <p>Whatpm Error Types
176  &lt;http://suika.fam.cx/gate/2005/sw/Whatpm%20Error%20Types&gt;.</p>  &lt;http://suika.fam.cx/gate/2005/sw/Whatpm%20Error%20Types&gt;.</p>
177  <p>HTML5 &lt;http://whatwg.org/html5&gt;.</p>  <p>HTML5 &lt;http://whatwg.org/html5&gt;.</p>
178    <p><a href="../Whatpm/HTML/Serializer.html">the Whatpm::HTML::Serializer manpage</a>.</p>
179  <p><a href="../Whatpm/NanoDOM.html">the Whatpm::NanoDOM manpage</a>.</p>  <p><a href="../Whatpm/NanoDOM.html">the Whatpm::NanoDOM manpage</a>.</p>
180  <p><a href="../Whatpm/ContentChecker/HTML.html">the Whatpm::ContentChecker::HTML manpage</a>.</p>  <p><a href="../Whatpm/ContentChecker/HTML.html">the Whatpm::ContentChecker::HTML manpage</a>.</p>
181  <p>  <p>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24