[Thoughts wanted] Parts.xml - xml improvement on Part.lst


Re: [Thoughts wanted] UPDATE: Parts.xml - xml improvement on Part.lst
#22
An xml standard allows one to write stuff like the below (it make parts.lst from parts.xml).
Code:
# use module
use XML::Simple;

# create object
$xml = new XML::Simple;

# read XML file
$data = $xml->XMLin("parts.xml");
@PEArray = @{$data->{"PartEntry"}};

foreach $Indx (0..$#PEArray) {
    print( sprintf("%-27s", $PEArray[$Indx]->{"Filename"})
       .$PEArray[$Indx]->{"Description"}."\n" );
}
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: [Thoughts wanted] UPDATE: Parts.xml - xml improvement on Part.lst - by Tim Gould - 2013-02-04, 2:24

Forum Jump:


Users browsing this thread: 2 Guest(s)