comparison Lib/IMPL/DOM/Transform/PostToDOM.pm @ 7:94d47b388442

Улучшены тесты Исправлены ошибки Улучшена документация Работа над схемой DOM
author Sergey
date Mon, 24 Aug 2009 01:05:34 +0400
parents
children 16ada169ca75
comparison
equal deleted inserted replaced
6:e2cd73ccc5bd 7:94d47b388442
1 package IMPL::DOM::Post2DOM;
2 use strict;
3 use warnings;
4
5 use IMPL::DOM::Navigator;
6 use IMPL::Class::Property;
7
8 use base qw(IMPL::Transform);
9
10 BEGIN {
11 public property Navigator => prop_get | owner_set;
12 }
13
14 our %CTOR = (
15 'IMPL::Transform' => sub {
16 return (
17 HASH => \&TransfromPostData
18 );
19 }
20 );
21
22 sub TransformPostData {
23 my ($this,$data) = @_;
24
25 my $navi = $this->Navigator;
26
27 while (my ($key,$value) = each %$data) {
28 my $node = $navi->Navigate($key);
29 $node->nodeValue($value);
30 }
31
32 return $navi->Document;
33 }
34
35
36 1;