Re: [Visualperl-discuss] visualperl App using MSXML 4.0?
by Eric Promislow other posts by this author
Aug 12 2002 5:39PM messages near this date
view in the new Beta List Site
RE: [Visualperl-discuss] visualperl App using MSXML 4.0?
|
[Visualperl-discuss] visualperl App using MSXML 4.0?
Just a product plug...
Visual Perl 1.5 now provides code-completion for objects loaded
via the Win32::OLE interface. I found with the sample code I
got drop downs for properties and methods off $xmlDoc.
This should make translating the MSDN docs into Perl calls easier.
- Eric Promislow
EricP@[...].com
On Mon, Jul 29, 2002 at 09:09:16PM -0700, Rick Brannan wrote:
> Hi Craig.
>
> Through the magic of Win32::OLE you can use MSXML today, VisualPerl or
> not. For instance, here's a quickie to validate an XML document using
> MSXML. Yes, I probably should test it, but I didn't -- I just stole it
> from some existing code and changed some values.
>
> -----------------
> use strict;
> use warnings;
> use Win32::OLE;
> my $file = "test.xml"
> my $xmlDoc = Win32::OLE->new("Microsoft.XMLDOM");
> $xmlDoc->{async} = 0;
> $xmlDoc->{validateOnParse} = -1 # 0 = parse, -1 = validate
> $xmlDoc->load($file);
>
> if($xmlDoc->{parseError}->{errorcode} == 0)
> {
> print "OK -- Document is valid!\n";
> }
> else
> {
> print "ERROR in line ".$xmlDoc->{parseError}->{line}.",
> errorcode ".$xmlDoc->{parseError}->{errorcode}."\n";
> print $xmlDoc->{parseError}->{reason};
> }
> -----------------
>
> The team I work with uses Perl and MSXML to hack at XML (and shove stuff
> through XSLT, and play with XPATH, and all sorts of fun stuff) quite
> frequently. Once you access the object, the docs on MSDN (with a little
> extra effort to translate them to a Perl syntax) are quite helpful in
> figuring out what you can do.
>
> Hope it helps.
>
> --------------------------------------------
> Rick Brannan - rick (at) libronix (dot) com
> "Light reading ... may amuse for the moment,
> but leaves nothing behind."
> -- George Washington
>
>
>
> -----Original Message-----
> From: Craig Dayton [mailto:cadayton@[...].net]
> Sent: Monday, July 29, 2002 7:22 PM
> To: visualperl-discuss@[...].com
> Subject: [Visualperl-discuss] visualperl App using MSXML 4.0?
>
>
> How feasible is it to consider building a visualperl application using
> MSXML 4.0?
>
> The main criteria making the MSXML 4.0 parser a must is its support of
> W3C XMLSchema spec.
>
> Any idea why XML::LibXML and other parser packages are shying away from
> the W3C XMLSchema spec?
>
> Thanks, Craig
>
> _______________________________________________
> VisualPerl-discuss mailing list
> VisualPerl-discuss@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> _______________________________________________
> VisualPerl-discuss mailing list
> VisualPerl-discuss@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
VisualPerl-discuss mailing list
VisualPerl-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Rick Brannan
Eric Promislow
|