Hi All,
The DCRnode get_node_list object does not seem to be functioning in the way the Perldoc describes it.
The Perldoc gives the following example:
######################################################################################
use TeamSite:

CRnode;
my $xml=<<EOS;
<?xml version="1.0" encoding="UTF-8"?>
<**** hen='egg'>
<a x='a' y='b'>moo</a>
<z>hello</z>
<a x='c' y='d'>cow</a>
<z>world</z>
<food>cdata_value_0
<p>peanut</p> cdata_value_1
<b>butter</b> cdata_value_2
<j>jelly</j> cdata_value_3
</food>
</****>
EOS
my $rootnode= TeamSite:

CRnode->new($xml);
my
@alist = $rootnode->get_node_list('a'); # fetches 'a' nodes
my
@zlist = $rootnode->get_node_list('z'); # fetches 'z' nodes
# Advanced example: get all nodes in 'food'
my
@nodes = $rootnode->get_node_list('food.*');
foreach $node (
@nodes) {
print "type: ", $node->type() , ".....",
"value: ", $node->value() , "\n";
}
This is printed:
type: CDATA.....value: cdata_value_0
type: p.....value: peanut
type: CDATA.....value: cdata_value_1
type: b.....value: butter
type: CDATA.....value: cdata_value_2
type: j.....value: jelly
type: CDATA.....value: cdata_value_3
#############################################################################################
Using the above example, the following code should populate $node_list with all the item nodes from the following dcr:
##############################################################################################
use TeamSite:

CRnode;
my $xml=<<EOS;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE record SYSTEM "dcr4.5.dtd">
<record name="ab" type="content">
<item name="name">
<value>ab</value>
</item>
<item name="leader">
<value></value>
</item>
<item name="sales_reps">
<value>/templatedata/Customer_Express/contact/data/emp1</value>
<value>/templatedata/Customer_Express/contact/data/emp2</value>
<value>/templatedata/Customer_Express/contact/data/emp3</value>
<value>/templatedata/Customer_Express/contact/data/emp4</value>
</item>
</record>
EOS
my $rootnode= TeamSite:

CRnode->new($xml);
my
@node_list = $rootnode->get_node_list("item");
# Follow the node tree down and extract the employee dcr paths under sales_reps.
##################################################################################
It does not seem to work that way.
@node_list is left empty. I was using this as a starting point to get the four employee dcr paths under "sales_reps" but I have found that the following command works.
my
@node_list = $rootnode->get_node_list("sales_reps");
This is easy and makes sense but I'm wondering if the Perldoc is wrong or if I'm missing something.
Thanks,
dh