#!/usr/bin/perl -w use CGI qw(:standard :html :forms); use strict; use XML::XPath; use XML::XPath::XMLParser; use XML::DOM; #------------------------------- # Declare variables my $WebPage = CGI::new(); ### Create web page output destination ### Pull in application name of file to read from my $SourceXMLDir = "/doc/staging/ProjectInfo/" . $WebPage->param(App) . ".xml"; ### Open XML file my $XMLFile = XML::XPath->new( filename => $SourceXMLDir ); my $ParseFile = new XML::DOM::Parser; my $XMLDOMFile = $ParseFile->parsefile ($SourceXMLDir ); #---------------END File Declaration----- ### header print $WebPage->header, $WebPage->start_html("Project Information for $ProjectName"); print "\n"; print $WebPage->h1("Contact Information for $ProjectName"), $WebPage->hr, "\n", "\n", "\n", "
PrimarySecondary
", $XMLFile->find( "/Project/Contacts/Contact[\@type='Primary']/Name/text()" ), "", $XMLFile->find( "/Project/Contacts/Contact[\@type='Secondary']/Name/text()" ), " 
\n"; my $AppNode = $XMLDOMFile->getElementsByTagName ("Contact"); my $numberNodes = $AppNode->getLength; print "\n", "\n", "\n"; for (my $loopIndex = 0; $loopIndex < $numberNodes; $loopIndex++) { "\n", "
ScopeNameWork PhonePager
", my $ScopeText = $AppNode->item($loopIndex)->getFirstChild()->getNodeValue(); } "
\n"; print "\n"; print $WebPage->end_html; print "\n";