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: XML::Twig beginner
by Ying Liu other posts by this author
Jun 19 2006 1:40PM messages near this date
view in the new Beta List Site
XML::Twig beginner | Re: XML::Twig beginner
& XSLT By the following code, I can get the 

my $xml_twig = XML::Twig-> new(); # create the twig
$xml_twig-> parsefile('test.x');
my $results = $xml_twig-> root;
my $seq_name = $results-> field('name');
            
How can I get the info under 'ProcessName'? field() does not work. Anyone can help? 

Thanks,
Ying


Ying Liu <cnyingliu@[...].com>  wrote: I just started with XML::Twig. Lots of complicated xml
 files. I test some examples code but didn't work well. There are too many methods in Twig. 
The following code is a simgple example. I want to get the text of <name>  (ThisIsMySequence)
 and two records of <ProcessName>  (ILikeProcesses, ILikeProcesses2). How to find levels of t
he xml file? and How to find interesting tags. Those XML files are quite long and complicate
d.

Thanks,
Ying


<?xml version="1.0"?> 
<SequenceConfig xmlns="com/hnc/core/common/process/sequence/config"> 
    <name> ThisIsMySequence</name>
    <VersionInfo> 
        <author> mbuser</author>
        <version> _working</version>
         <versionDescription> </versionDescription>
        <lastModifiedDate> 1150231914745</lastModifiedDate>
    </VersionInfo> 
    <ProcessNames> 
        <processName> ILikeProcesses</processName>
        <processName> ILikeProcesses2</processName>
    </ProcessNames> 
</SequenceConfig> 
    

---------------------------------
Yahoo! Sports Fantasy Football �06 - Go with the leader.  Start your league today! _______
________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


 		
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
Thread:
Ying Liu
Ying Liu
Andreas P?rzer
Ying Liu
Andreas Pürzer
Ying Liu
Andreas Pürzer
Andreas Pürzer
Ying Liu

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