[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-date: Wed Dec 1 09:16:33 2004 -->
- <!--x-from-r13: psbjyre ng bhgcbfgfragvary.pbz (Quevfgbcure Tbjyre) -->
- <!--x-message-id: [email protected] -->
- <!--x-subject: [ale] Issue with sub name and XML::Parser -->
- <li><em>date</em>: Wed Dec 1 09:16:33 2004</li>
- <li><em>from</em>: cfowler at outpostsentinel.com (Christopher Fowler)</li>
- <li><em>subject</em>: [ale] Issue with sub name and XML::Parser</li>
Here is the code:
#!/opt/SAM/perl/bin/perl -I/opt/SAM/perl-lib
use XML::Parser;
{
package web_xml;
sub param-name {
}
sub _param-name {
}
sub char_handler {
}
}
sub get_data {
my $data = "";
open(F, "</usr/local/tomcat/webapps/AlarmCenter/WEB-INF/web.xml");
while(<F>) {
$data .= $_;
}
close(F);
return $data;
}
sub main {
my $data = get_data();
my $parser = new XML::Parser(Style => 'Subs', Pkg => 'web_xml');
$parser->setHandlers(Char => \&web_xml::char_handler);
$parser->parse($data);
return;
}
main;
# vi: set ts=2 sw=2: #
web.xml:
<param-name>console-log-path</param-name><param-value>/u01/cms/logs/</param-value>
Perl does not like 'sub param-name'
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00028" href="msg00028.html">[ale] Issue with sub name and XML::Parser</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00020.html">[ale] Introduction</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00022.html">[ale] Flat Rate</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00037.html">[ale] custome init levels</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00028.html">[ale] Issue with sub name and XML::Parser</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00021"><strong>Date</strong></a></li>
<li><a href="threads.html#00021"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>