Ask a Question related to PERL Modules, Design and Development.
-
ppb #1
New namespace X12::Parser
I am in the process of completing the work on a parser for parsing
ANSI X12 data/transaction files.
I have named the parser X12::Parser.
Since there are various ANSI X12 data formats, I have comeup with a
config file specification. The user defines this file for the X12
format he intends to parse.
The X12::Cf module reads this config file. The X12::Cf module is used
in X12::Parser. (The module X12::Cf is provided with X12::Parser).
Here's the methods that I am providing with this module.
use X12::Parser;
# Create a parser object
my $p = new X12::Parser;
# Parse a data file based on the configuration file
$p->parse ( file => '837.txt', # <--- file to parse
conf => '837_004010X098.cf' # <--- user created config
file
);
# Step through the file
while ( my $loop = $p->get_next_loop ) {
my @loop = $p->get_loop_segments ($loop);
}
# or use this method instead
while ( my ($pos, $loop) = $p->get_next_pos_loop ) {
my @loop = $p->get_segments ($pos);
}
# dump the file to stdout,
$p->print_tree
Pls offer your suggestions on using
the namespace X12::Parser and X12::Cf.
Thanks,
ppb
ppb Guest
-
Namespace for MMS Parser class and a request for help
Hi, I have written a set of classes for MMS (or picture) message parsing and wanted to check my namespace usage before uploading to CPAN.... -
IPTables namespace - how to commandeer namespace
I have a Perl module, IPTables::IPv4, that I've been developing for some time, and that is in the CPAN repository. I've expanded the module to... -
HTML-Parser / SGML-Parser
Ok, silly question. I am writing a script to determine my router's WAN ip address and then to email me once an hour in case it changes. Currently... -
<asp:> namespace
I'm working with an XSL document that renders ASP.NET Server Controls. In order to do this, I have to declare an "asp" namespace within the XSL...



Reply With Quote

