view Lib/IMPL/DOM/Document.pm @ 63:76b878ad6596

Added serialization support for the IMPL::Object::List More intelligent Exception message Fixed encoding support in the actions Improoved tests Minor fixes
author wizard
date Mon, 15 Mar 2010 02:38:09 +0300
parents 16ada169ca75
children 9d24db321029
line wrap: on
line source

package IMPL::DOM::Document;
use strict;
use warnings;

use base qw(IMPL::DOM::Node);

__PACKAGE__->PassThroughArgs;

sub document {
    return $_[0];
}

sub Create {
    my ($this,$nodeName,$class,$refProps) = @_;
    
    $refProps ||= {};
    
    delete $refProps->{nodeName};
    
    return $class->new(
        nodeName => $nodeName,
        document => $this,
        %$refProps
    );
}

{
    my $empty;
    sub Empty() {
        return $empty ? $empty : $empty = __PACKAGE__->new(nodeName => 'Empty');
    }
}

1;
__END__

=pod

=head1 DESCRIPTION

=head1 METHODS

=over

=item C<<$doc->Create>>

Создает узел определеннго типа с определенным именем и свойствами.

=back

=cut