Mercurial > pub > Impl
comparison Lib/IMPL/DOM/Navigator/Builder.pm @ 12:955b2324c1bf
Работа над навигаторами и схемой DOM модели
author | Sergey |
---|---|
date | Mon, 31 Aug 2009 01:37:43 +0400 |
parents | |
children | bb8d67f811ea |
comparison
equal
deleted
inserted
replaced
10:63f6653b094e | 12:955b2324c1bf |
---|---|
1 package IMPL::DOM::Navigator::Builder; | |
2 use strict; | |
3 use warnings; | |
4 | |
5 use base qw(IMPL::DOM::Navigator); | |
6 | |
7 use IMPL::Class::Property; | |
8 | |
9 BEGIN { | |
10 public property SchemaNavigator => prop_get | owner_set; | |
11 } | |
12 | |
13 1; | |
14 | |
15 =pod | |
16 | |
17 =head1 SYNOPSIS | |
18 | |
19 my $nav = new IMPL::DOM::Navigator::Builder(Schema => $mySchema); | |
20 | |
21 # set position to root | |
22 $nav->InitRoot(); | |
23 | |
24 # go to node 'Person' and create one if not exists | |
25 $nav->NavigateAuto("Person"); | |
26 | |
27 # set some node properties | |
28 $nav->nodeCurrent->Name("Smith"); | |
29 $nav->nodeCurrent->Age("20"); | |
30 | |
31 # navigate to node 'Address' and create one if not exists | |
32 $nav->NavigateAuto("Address"); | |
33 | |
34 =head1 DESCRIPTION | |
35 | |
36 , | |
37 | |
38 =cut |