HTML-MyHTML
view release on metacpan or search on metacpan
=head3 string
Get myhtml_string_t object by token node
my $string = $token_node->string();
Return: HTML::MyHTML::String if exists, otherwise an NULL value
=head3 wait_for_done
Wait for process token all parsing stage. Need if you use thread mode
$token_node->wait_for_done();
=head2 Detect encoding
=head3 encoding_detect
Detect character encoding.
Now available for detect UTF-8, UTF-16LE, UTF-16BE and Russians: windows-1251, koi8-r, iso-8859-5, x-mac-cyrillic, ibm866. Other in progress
# $text[in] text
# $out_encoding[out] detected encoding
my $bool = $myhtml->encoding_detect($text, $out_encoding);
Return: 1 (true) if encoding found, otherwise 0 (false)
=head3 encoding_detect_russian
Detect Russian character encoding
Now available for detect windows-1251, koi8-r, iso-8859-5, x-mac-cyrillic, ibm866
# $text[in] text
# $out_encoding[out] detected encoding
my $bool = $myhtml->encoding_detect_russian($text, $out_encoding);
Return: 1 (true) if encoding found, otherwise 0 (false)
=head3 encoding_detect_unicode
Detect Unicode character encoding
Now available for detect UTF-8, UTF-16LE, UTF-16BE
# $text[in] text
# $out_encoding[out] detected encoding
my $bool = $myhtml->encoding_detect_unicode($text, $out_encoding);
Return: 1 (true) if encoding found, otherwise 0 (false)
=head3 encoding_detect_bom
Detect Unicode character encoding by BOM
Now available for detect UTF-8, UTF-16LE, UTF-16BE
# $text[in] text
# $out_encoding[out] detected encoding
my $bool = $myhtml->encoding_detect_bom($text, $out_encoding);
Return: 1 (true) if encoding found, otherwise 0 (false)
=head2 Incoming Buffer
=head3 find_by_position
Get Incoming Buffer by position
my $incoming_buffer = $incoming_buffer->find_by_position($begin_position);
Return: HTML::Incoming::Buffer if successful, otherwise a UNDEF value
=head3 data
Get data of Incoming Buffer
my $data = $incoming_buffer->data();
Return: text scalar if successful, otherwise a UNDEF value
=head3 length
Get data length of Incoming Buffer
my $length = $incoming_buffer->length();
Return: scalar length
=head3 size
Get data size of Incoming Buffer
my $size = $incoming_buffer->size();
Return: scalar size
=head3 offset
Get data offset of Incoming Buffer. Global position of begin Incoming Buffer.
my $offset = $incoming_buffer->offset();
Return: scalar offset
=head3 relative_begin
( run in 0.461 second using v1.01-cache-2.11-cpan-140bd7fdf52 )