RE: Parsing empty fields XML using perl
by Wayne Simmons other posts by this author
May 14 2009 12:58PM messages near this date
view in the new Beta List Site
Re: Parsing emoty fields XML using perl
|
Can't get 'content' element to fold correctly in XML::Simple
& XSLT From: Alok Sharma
Sent: Thursday, May 14, 2009 1:11 PM
> I need to extract the TOPNAME and MAPREF fields. Please suggest.
I suggest you use XML::XPath. Read the docs on how to use it, it would make
your extremely confusing loops disappear into something far more readable.
Plus all the "getFirstChild" and "getData" disappear too. You might have to
learn XPath but it will be a worthwhile time spent. Parsing a DOM without
XPath is tedious and error prone.
You can easily specify tags and elements with XPath, to get all the info you
need from a file.
-Wayne
--
Software Engineer
InterSystems USA, Inc.
303-858-1000
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Alok Sharma
Jenda Krynicky
Wayne Simmons
|