view Lib/IMPL/DOM/Document.pm @ 36:1828103371d0

DOM in works
author Sergey
date Fri, 20 Nov 2009 16:48:08 +0300
parents 7f00786f8210
children c2e7f7c96bcd
line wrap: on
line source

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

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

__PACKAGE__->PassThroughArgs;

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