[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: SAX.pm
File is not writable. Editing disabled.
# $Id$ # # This is free software, you may use it and distribute it under the same terms as # Perl itself. # # Copyright 2001-2003 AxKit.com Ltd., 2002-2006 Christian Glahn, 2006-2009 Petr Pajas # # package XML::LibXML::SAX; use strict; use warnings; use vars qw($VERSION @ISA); $VERSION = "2.0210"; # VERSION TEMPLATE: DO NOT CHANGE use XML::LibXML; use XML::SAX::Base; use parent qw(XML::SAX::Base); use Carp; use IO::File; sub CLONE_SKIP { return $XML::LibXML::__threads_shared ? 0 : 1; } sub set_feature { my ($self, $feat, $val) = @_; if ($feat eq 'http://xmlns.perl.org/sax/join-character-data') { $self->{JOIN_CHARACTERS} = $val; return 1; } shift(@_); return $self->SUPER::set_feature(@_); } sub _parse_characterstream { my ( $self, $fh ) = @_; # this my catch the xml decl, so the parser won't get confused about # a possibly wrong encoding. croak( "not implemented yet" ); } # See: # https://rt.cpan.org/Public/Bug/Display.html?id=132759 sub _calc_new_XML_LibXML_parser_for_compatibility_with_XML_Simple_etc { return XML::LibXML->new( expand_entities => 1, ); } sub _parse_bytestream { my ( $self, $fh ) = @_; $self->{ParserOptions}{LibParser} = $self->_calc_new_XML_LibXML_parser_for_compatibility_with_XML_Simple_etc() unless defined $self->{ParserOptions}{LibParser}; $self->{ParserOptions}{ParseFunc} = \&XML::LibXML::parse_fh; $self->{ParserOptions}{ParseFuncParam} = $fh; $self->_parse; return $self->end_document({}); } sub _parse_string { my ( $self, $string ) = @_; $self->{ParserOptions}{LibParser} = $self->_calc_new_XML_LibXML_parser_for_compatibility_with_XML_Simple_etc() unless defined $self->{ParserOptions}{LibParser}; $self->{ParserOptions}{ParseFunc} = \&XML::LibXML::parse_string; $self->{ParserOptions}{ParseFuncParam} = $string; $self->_parse; return $self->end_document({}); } sub _parse_systemid { my $self = shift; $self->{ParserOptions}{LibParser} = $self->_calc_new_XML_LibXML_parser_for_compatibility_with_XML_Simple_etc() unless defined $self->{ParserOptions}{LibParser}; $self->{ParserOptions}{ParseFunc} = \&XML::LibXML::parse_file; $self->{ParserOptions}{ParseFuncParam} = shift; $self->_parse; return $self->end_document({}); } sub parse_chunk { my ( $self, $chunk ) = @_; $self->{ParserOptions}{LibParser} = $self->_calc_new_XML_LibXML_parser_for_compatibility_with_XML_Simple_etc() unless defined $self->{ParserOptions}{LibParser}; $self->{ParserOptions}{ParseFunc} = \&XML::LibXML::parse_xml_chunk; $self->{ParserOptions}{LibParser}->{IS_FILTER}=1; # a hack to prevent parse_xml_chunk from issuing end_document $self->{ParserOptions}{ParseFuncParam} = $chunk; $self->_parse; return; } sub _parse { my $self = shift; my $args = bless $self->{ParserOptions}, ref($self); if (defined($self->{JOIN_CHARACTERS})) { $args->{LibParser}->{JOIN_CHARACTERS} = $self->{JOIN_CHARACTERS}; } else { $args->{LibParser}->{JOIN_CHARACTERS} = 0; } $args->{LibParser}->set_handler( $self ); eval { $args->{ParseFunc}->($args->{LibParser}, $args->{ParseFuncParam}); }; if ( $args->{LibParser}->{SAX}->{State} == 1 ) { croak( "SAX Exception not implemented, yet; Data ended before document ended\n" ); } # break a possible circular reference $args->{LibParser}->set_handler( undef ); if ( $@ ) { croak $@; } return; } 1;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.54 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A