Okay. Let me list what exactly I need:

1. I have to define a config xml file 2. XML file should contain two different types of Parameters a. Special type b. Default type And each parameter under these types can have more than one instances which needs be differentiated by adding an attribute called "instance" in the node "parameter". 3. Later I need to read this config xml, and should extract first parameters under default type, instance wise and get the value for each parameter via a hash or array. 4. Same as above for special type of parameters as well.

<?xml version="1.0" encoding="UTF-8"?> <list> <feature category="defaultlist"> <parameter instance="0">sampleparameter</parameter> <value>1</value> <parameter instance="0">firstparameter</parameter> <value>1</value> <parameter instance="1">firstparameter</parameter> <value>1</value> </feature> <feature category="speciallist"> <parameter instance="0">splparameter</parameter> <value>1</value> </feature> </list>

In reply to Re^8: XML Parsing by vmallya
in thread XML Parsing by vmallya

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.