Professional Web Applications Themes

Nested hash conversion to HTML - PERL Modules

Hello list... At my company, we are looking for a module that would help out with converting multiple layer nested hashes into HTML format. We want to try and stay away from templates as much as possible so Template::Toolkit is out ( for now ). So if anyone can point in the right direction, we would be very grateful. Thanks, Eric...

  1. #1

    Default Nested hash conversion to HTML

    Hello list...

    At my company, we are looking for a module that would help out with
    converting multiple layer nested hashes into HTML format. We want to
    try and stay away from templates as much as possible so
    Template::Toolkit is out ( for now ). So if anyone can point in the
    right direction, we would be very grateful.

    Thanks,

    Eric
    Eric Olson Guest

  2. #2

    Default Re: Nested hash conversion to HTML

    [email]erotfhs.net[/email] (Eric Olson) writes:
    > At my company, we are looking for a module that would help out with
    > converting multiple layer nested hashes into HTML format.
    That it too vague a description of what you want.
    > We want to try and stay away from templates as much as possible so
    > Template::Toolkit is out ( for now ). So if anyone can point in the
    > right direction, we would be very grateful.
    How about Data::Dumper's Dumper() (to dump the hash as plain text) and
    CGI's escapeHTML() (to escape any characters that are special in
    HTML)?

    I suspect that that is not what you wanted - but only because there
    are millions of things you could want and so the chances of anyone
    guessing which one you actually want is vanishingly small.

    --
    \\ ( )
    . _\\__[oo
    .__/ \\ /\
    . l___\\
    # ll l\\
    ###LL LL\\
    Brian McCauley Guest

  3. #3

    Default Re: Nested hash conversion to HTML

    ==================
    Brian McCauley <nobullmail.com> wrote in message
    That it too vague a description of what you want.

    How about Data::Dumper's Dumper() (to dump the hash as plain text) and
    CGI's escapeHTML() (to escape any characters that are special in
    HTML)?

    I suspect that that is not what you wanted - but only because there
    are millions of things you could want and so the chances of anyone
    guessing which one you actually want is vanishingly small.
    ===================

    Ok.. I apologize for the vague description...So.. here goes...

    We have this type of hash structure in our software (It's huge but it
    works for now)

    $hash->{'layer1'}->{$layer1Variable}->{'layer2'}->{$layer2Variable}..etc..etc..

    The whole thing is around 7 layers deep with varying information
    stored at each level. Is there a way to p this information out
    into HTML without using a template function or Data::Dumper?

    I appreciate all help with this.

    Thanks,
    Eric
    Eric Olson Guest

  4. #4

    Default Re: Nested hash conversion to HTML

    Eric Olson wrote:
    > We have this type of hash structure in our software (It's huge but it
    > works for now)
    >
    >
    $hash->{'layer1'}->{$layer1Variable}->{'layer2'}->{$layer2Variable}..etc..et
    c..
    >
    > The whole thing is around 7 layers deep with varying information
    > stored at each level. Is there a way to p this information out
    > into HTML without using a template function or Data::Dumper?
    Pretty trivial. Just write a function/set of functions that traverses your
    data tree and prints the appropriate HTML tags along with your data.

    Now, how to traverse the tree (depth first or width first or maybe even a
    combination) and where in this process to print which HTML code totally
    depends on how _you_ want the data to be displayed.

    jue


    Jürgen Exner Guest

  5. #5

    Default Re: Nested hash conversion to HTML

    "Jürgen Exner" <jurgenexhotmail.com> wrote in message
    > Pretty trivial. Just write a function/set of functions that traverses your
    > data tree and prints the appropriate HTML tags along with your data.
    >
    > Now, how to traverse the tree (depth first or width first or maybe even a
    > combination) and where in this process to print which HTML code totally
    > depends on how _you_ want the data to be displayed.
    >
    > jue


    Thanks for all the input. I hoped to find a module to do this. I'll give it a shot.

    Thanks again,
    Eric
    Eric Olson Guest

  6. #6

    Default Re: Nested hash conversion to HTML

    [email]erotfhs.net[/email] (Eric Olson) writes:
    > At my company, we are looking for a module that would help out with
    > converting multiple layer nested hashes into HTML format.
    not XML?

    Klaus Schilling
    510046470588-0001@t-online.de Guest

  7. #7

    Default Re: Nested hash conversion to HTML

    [email]erotfhs.net[/email] (Eric Olson) writes:
    > Brian McCauley <nobullmail.com> wrote in message
    >
    > > How about Data::Dumper's Dumper() (to dump the hash as plain text) and
    > > CGI's escapeHTML() (to escape any characters that are special in
    > > HTML)?
    > >
    > > I suspect that that is not what you wanted - but only because there
    > > are millions of things you could want and so the chances of anyone
    > > guessing which one you actually want is vanishingly small.
    >
    > Ok.. I apologize for the vague description...So.. here goes...
    >
    > We have this type of hash structure in our software (It's huge but it
    > works for now)
    >
    > $hash->{'layer1'}->{$layer1Variable}->{'layer2'}->{$layer2Variable}..etc..etc..
    >
    > The whole thing is around 7 layers deep with varying information
    > stored at each level. Is there a way to p this information out
    > into HTML without using a template function or Data::Dumper?
    That adds no information to what was in the original post. You have
    mearly explained what you meant by the term "Nested hash" and I had
    had no problem with that term in the first place.
    > I appreciate all help with this.
    You need to take a step back and figure out what you are trying to do.

    If you can't manage an abstract description then perhaps example input
    and output would give us some clue as to what you are thinking.

    --
    \\ ( )
    . _\\__[oo
    .__/ \\ /\
    . l___\\
    # ll l\\
    ###LL LL\\
    Brian McCauley Guest

Similar Threads

  1. Multiple PDF, PPT, DOC to html or text conversion
    By osiceanu in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: February 21st, 10:18 AM
  2. MD5 Hash on HTML Form
    By Aasin in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: October 23rd, 06:28 PM
  3. conversion to html missing line returns
    By ChrisLynn webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 0
    Last Post: November 4th, 07:58 PM
  4. nested HTML parsing
    By Brian McCauley in forum PERL Miscellaneous
    Replies: 4
    Last Post: August 8th, 03:27 PM
  5. Dreamweaver HTML to PDF conversion (k)
    By Stern PowerBook in forum Macromedia Dreamweaver
    Replies: 4
    Last Post: July 18th, 07:29 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139