-
vanilla,mango,nuts
...
....
####
my $parser = XML::LibXML->new();
my $recipeDoc = $parser->parse_file("recipe.xml");
foreach my $recipe ($recipeDoc->getElementsByTagName("recipe")) {
$recipeName = $recipe->getAttribute("name");
foreach my $step ($recipe->getElementsByTagName("step")) {
foreach my $dep ($step->getElementsByTagName("dependency")) {
if($dep->hasAttribute("use") {
# this is where i am struck.
# here i have to get value from the command line ( and i know how to get the information from command line) and match it with the dependency value. (the issue is with matching it with the dependency value after getting the values from command line)
}
$stepName = $step->getAttribute("name");
}
}