My problem is that I'm unable to access the individual STOCK_CODE, WHOLESALE_PRICE, MAP_Price, and DISC elements within the XML document.
That's exactly what your initial code did. The thing is, you don't want them individually, you want to access those elements of each product as a group (judging by your second program). As such, the element you are really interested in is the product element. Since that's exactly what your second program does, it's indeed a perfectly fine solution.
In reply to Re: XML::Twig and twig_roots - Accessing Individual XML Elements
by ikegami
in thread XML::Twig and twig_roots - Accessing Individual XML Elements
by jbush82
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |