Hello! I'm a brand new to Perl, but not to programming.
So far, I'm able to read in and parse and XML doc to the screen, but I'm currently at a loss as what to do next. I've been searching for some help, but am a little directionless as all-things-Perl is too new for me yet. I probably passed by some good help and didn't know it already...
Here what I'm trying to do:
- Load in an XML file
- Parse the file and look for content in it (recordsets)
- Take those records that match certain criteria and
WRITE them to a new XML file on the server.
- Do this about 30 times, for different criteria, from the master XML file from the first step.
As of yet, I can't find a way to do this. I'm not looking for hand-holding, but some good info or tips or tutorials to get me going, so I can then formulate the next intelligent question.
I started from ground zero today, with utterly no knowledge of Perl. I got it running on my PC and got this far (which to me was a LOT):
#!/usr/local/bin/perl -w
use warnings;
use XML::Parser;
my $p1 = new XML::Parser(Style => 'Debug');
$p1->parsefile('test.xml');
Thanks,
Doug
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.