D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Perl question on XML::Parser



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil Williams wrote:
>
> Would that increase the dependency requirements for the project? (It's
for
> isbnsearch on sourceforge). Is XML::Parser part of the default Perl
> installation?

XML::Parser wasn't installed on my box :(

I found this tutorial.

http://www-106.ibm.com/developerworks/library/xml-perl/

I'm not quite clear what is returned by the Parser, but the impression I
get is you don't use that, but do everything by event handlers.

This would be somewhat analogous to how you use flex (or lex) as a
parser in C code, where you describe the grammar in rules, and then add
code to handle those cases in amongst the rules. Although obviously in
XML you don't need to describe the grammar as it already given in the
document.

If you actually want to read the XML in and manipulate it as a complete
structure of some sort, then maybe you want one of the other Perl
modules described in the tutorial?

> Where can I find out about things like that? Which modules can I expect a
> 'standard' webhost to have already installed? I'm only using my
current host
> as an example - is there a consensus on which modules are likely to be
> available?

I doubt it, although asking for XML modules is hardly likely to be
controversial. Perl modules can be installed locally.

> In some
> ways, requiring admin input via a PHP interface is moderately better
security
> than allowing this particular service to run automatically.

Hmm, it is rarely better to have manual steps.

Assume that it won't happen unless it is required for continued
operation, even if you write that bit of the documentation in capital
letters.

The other approach would be check on each invocation if a certain period
has elapsed since last maintenance period and trigger it now
(synchronously or asynchronously depending how urgent it it).

You'll get more clueful answers on the Perl Monger list I think.

 Simon, definitely no expert in this, but trying to keep up with Neil as
he is learning.

PS: This week I came across another Neil Williams at Bristol University,
who is working on cures for autoimune disorders. Apparently they are
looking at moving away from mice to humans. Whether this is good for the
mice (no more experimenting), or bad (if they get arthritis they are
stuck with it), is unclear. I'm guessing the rodents will come of worst
whatever happens. Their sacrifice is appreciated, even if they didn't
have much say in the matter.
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/gTsTGFXfHI9FVgYRAvwdAJ44wAsIXTF4icsodZIHcLq3Mk8+0wCdGCyJ
40XIqpFTCa94ppSj1Djyjpg=
=fG4n
-----END PGP SIGNATURE-----

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly