The Bigger Picture:
I am extracting the data from a set of perl files and storing it in the hash of hashes structure as described above in the sample data. the structure of the hash is described as
$functions = {
'function-name' => {
'Function-Description' = 'Description'
'Function-Type' = 'Type'
'Function-Location' = 'File in which function is located'
'Values to be passed to function' => {
'1' = 'Value 1 Description',
...
...
'n' = 'Value n Description'}
},
...
...
'function-name' => {
'Function-Description' = 'Description'
'Function-Type' = 'Type'
'Function-Location' = 'File in which function is located'
'Values to be passed to function' => {
'1' = 'Value 1 Description'
...
...
'n' = 'Value n Description'}
}
}
I have to now represent it to the users and allow them to search for the Functions they require and return details of the functions that match. The presentation happens over web as a webpage that shall
1. Already have all this information.
2. A search tool that returns only the information for a particular function that the user wants.
Thus I wanted was converting it to XML so that I could then use XML and possibly AJAX for returning suggested matches when a user searches for a function.
Now if you are familiar with XSL, you do know that you can create a stylesheet that allows you to described the style information for each node.
But in the XML conversion that grandfather suggested, the node names are the actual function names and with more than 1000 different functions existing, it would not be practical to create a stylesheet with description for each function-node. Thus I wished To convert it in the format I suggested.
Again, I am new to perl thus I am unsure how I can do this in one time when the first perl-to-xml conversion happens rather than to repeating it as this functionality I intend to take it live and thus would require to happen during every maintenance cycle.
I hope that would be descriptive enough to explain my concern with perl-to-xml conversion.
Bugz.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.