Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Reading DCR values
JoshProx
I want to read all the items with same name in a DCR. I want to load them into an array. Basically I have similar containers which contain items for Id, label and description. I have wrapped them in different containers so that I display one container per page when the DCR loads. I want to load all the ids, all the labels and descriptions in three arrays for doing the search and processing.
I am using XPath for parsing the DCR. The code gives an entity reference error while reading dcr4.5.dtd
Here is the code snippet which am writing -
my $xp = XML::XPath->new($glosDCR);
my $nodeset = $xp->find("record/item/value/item");
foreach my $node ($nodeset->get_node_list) {
print INLINELOG XML::XPath::XMLParser::as_string($node)."\n";
}
ANY THOUGHTS ON BEST WAY FOR READING AND ACHIEVING THIS FUNCTIONALITY. I am also attaching the datacapture.cfg and generated DCR for your reference.
Thanks,
Josh
Find more posts tagged with
Comments
JoshProx
I am able to use DCRnode for parsing the DCR. I am looping through the containers and pushing it into an array -
my $rootnode = TeamSite:
CRnode->new($strXML);
my
@arrTemp
= ("0-9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
my
@arrNodes
= ();
foreach my $temp(
@arrTemp)
{
my
@list
= $rootnode->get_node_list("cntAlphabet".$temp);
push
@arrNodes
,
@list
;
}