ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
RE: [ANNOUNCE] XML::SAX::2Simple
by Grant McLean other posts by this author
Jan 16 2002 9:20AM messages near this date
view in the new Beta List Site
RE: Stripping UTF8 from variables. | Re: [ANNOUNCE] XML::SAX::2Simple
From: Barrie Slaymaker [mailto:barries@[...].com]
>  On Tue, Jan 15, 2002 at 08:40:05PM +0000, Duncan Cameron wrote:
>  > 1) shouldn't this be within the XML::Simple namespace, e.g.
>  > something like XML::Simple::Builder. In fact I thought that I read
>  > that Grant McLean was already working on this.
>  
>  Adapter classes like this usually could "naturally" be in either
>  namespace, I happened to drop it in XML::Handler because it's a SAX
>  handler and that's my habitual place for them.  And, if 
>  Grant's already working on this, he'll be wanting that name for his
>  package, I suspect.

Version 1.07b of XML::Simple (which will be checked into CVS later this
week) can act as a SAX handler like this:

  my $xs = XML::Simple-> new(%options);
  my $xp = XML::SAX::ParserFactory-> parser(Handler => $xs);
  my $ref = $xp-> parse_uri($filename);

And can also drive a SAX pipeline like this:

  my $ref = {
    ... your data here ...
  };
  my $xs = XML::Simple-> new(%options);
  my $handler = Some::Sax::Handler;
  $xs-> XMLout($ref, Handler => $handler);

This is all within XML::Simple.pm with no requirement for extra module
namespace.

Regards
Grant




The information in this email is confidential and may be legally privileged. It is intended 
solely for the addressee. Access to this email by anyone else is unauthorised.if you are not
 the intended recipient, any disclosure, copying, distribution, or any action taken or omitt
ed to be taken in reliance on it is prohibited and may be unlawful. Please note that any vie
ws, opinions or advice contained in this email are those of the sending individual and not n
ecessarily those of the firm. It is possible for data transmitted by e-mail to be deliberate
ly or accidentally corrupted or intercepted. For this reason, where the communication is by 
e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may a
rise from the use of this medium. If you have received this e-mail in error please notify us
 immediately at mailto:helpdesk@[...].ie and delete this e-mail from your system.

_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-xml
Thread:
Grant McLean
Barrie Slaymaker

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved