Hi Monks,

I need to develop an xml generating framework at my work which has to do following things.

Objective: With out installing a product manually (currently, we have to install 7000 ibm applications), we need to find an evidence that uniquely identifies a product that is otherwise installed.This unique identification comes from an xml file with in the installer file that gives the following information i.e productname, publisher and version.

For example, "ibm websphere application server 8.0". We may get multiple evidences like this from the installer file. So, we need to crack the installer file and extract the installer evidence.IBM has multiple installer technologies like Installation Manager, Install Anywhere etc.... Installer evidence will be something like this:

<package Name="IBM Websphere Application Server" Evidence="IA" Version="8.0"> <property Name="Publisher" Value="IBM"/> </package>
Like these, many packages should be created in the resultant xml file.

Framework should be generic and should open an interactive menu asking user to input following:

a.Type of Installer technology ( if we select this option,it should ask for installer file location.Then Framework will process installer file and produce the resultant xml file)

b.Get File Evidence ( if we select this option, it should ask for file location.Framework should scan zip files to look for a specific file that ibm writes on the file system and write that into the resultant xml file).

File evidence should be something like this:

<Content MD5="NO-MD5" Size=50> <InstancePath="/opt/tivoli/ibm/WASND0800.SYS2"/> </Content>

Framework should take care of logging also. For each Installer technology,there will be a separate script like a plugin that processes the data and returns the installer package information to the framework (main script),main script should collect that data into a datastructure and dump that into the resultant xml file.

The resultant xml file will be consumed by our application.

Dear Monks,

Now i need approach to this kind of framework. My plan is to go for an object oriented approach.Please find my steps:

1.Create a class that collects installer information and stores into productName variable,Publisher Variable and Version Variable and returns an object that holds these three values.

2.Create XML writer class which accepts the object values created in step 1 and write them to the resultant xml file.

3.Create a logger class that collects print information from the plugin script and write to the log file about the ongoing process

Is this right approach? Please guide me.

Thanks in Advance and Your help is much appreciated.

Sriram

In reply to Need to develop a generic framework which generates an XML output by sriram83.life

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.