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
XML::Writer from another script
by Sharif Islam other posts by this author
Mar 14 2007 7:22AM messages near this date
view in the new Beta List Site
Re: XML::LibXML and Changing Element Value | REG:Environmental variables
& XSLT I am calling another perl script from my current script. I am having some
problems closing and starting the tag using XML::Writer.
So here's my first script:

$writer-> startTag("myFirstTag");
$writer-> startTag("mySecondTag");
.....
   $writer-> endTag("mySecondTag");
#Here I want to call my other script:
my $other_script = "perl script.pl";
system($other_script);
#Content of other script:
$writer-> startTag("myOtherTag");
....# do stuff
$writer-> endTag("myOtherTag");
#end of other script
 $writer-> endTag("myFirstTag")

It runs fine without a warning, but the XML output looks like this:
<myFirstTag> 
   <mySecondTag> 
  ........
    ... .....
 </mySecondTag> 
myOtherTag>    # it shows up like this, the opening bracket is missing.
.........
</myOtherTag> 
 </myFirstTag> 

Any idea? Thanks.


--sharif

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