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 Andreas Pürzer other posts by this author
Jun 21 2006 11:01AM messages near this date
view in the new Beta List Site
Re: XML::Twig beginner | Re: XML::Twig beginner
& XSLT Ying Liu schrieb:
>  My new question is what is the best way to parse the following XML file.
>  This is just a part of long long file. I want the text of <configName>
>  <configType> and <type>, <type> is under <Arg>. Now, I can get
>  <configName> and <configType>. Then, I need to enter <Ports>, <Port>,
>  <Args> and <Arg> levels and then to get <type> info.

You already know how to do that.

>  Can I just jump
>  some of the tags and get <type> directively.

Yes, one of the snippets I gave you does exactly that.

>  I set 'type' at TwigRoots, doesn't work. 

Sorry, but "doesn't work" is the Worst-Problem-Description ever. :-<
Besides, I don't think you'd need to fiddle with TwigRoots, at least not
with the XML you've shown until now.

As I said, the code I've shown you is capable of giving you the wanted
results. Figuring out what single word in which snippet you need to
change to adapt it will make a great learning-exercise!

Greetings,
Andreas Pürzer

-- 
perl -mAcme::JAPH

_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
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