Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, Need help in parsing xml file using shell script and generate report in a PDF file Xml file input <report> <student name="x" father name="x1" class="first" Address="xyz"> <property name="sports" value="yes"/> ...
  1. #1
    Just Joined!
    Join Date
    May 2008
    Posts
    15

    Need help in parsing XML file

    Hi,

    Need help in parsing xml file using shell script and generate report in a PDF file


    Xml file input

    <report>
    <student name="x" father name="x1" class="first" Address="xyz">
    <property name="sports" value="yes"/>
    <property name="drawing" value="no"/>
    </student>
    <student name="y" father name="y1" class="first" Address="zxy">
    <property name="sports" value="yes"/>
    <property name="drawing" value="no"/>
    </student>
    <student name="z" father name="z1” class="second" Address="yzx">
    <property name="sports" value="no"/>
    <property name="drawing" value="yes"/>
    <property name="singing" value="yes"/>
    </student>
    </report>

    There might be n number of records in the input file

    OUTPUT:

    Output format (in PDF)

    1. student name x
    Address
    xyz
    sports
    Yes
    drawing
    No
    singing
    Na
    2.student name y
    Address
    zxy
    sports
    Yes
    drawing
    No
    singing
    Na

    3.student name z
    Address
    yzx
    sports
    No
    drawing
    Yes
    singing
    yes

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Student project, no?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...