Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Generation of a Hash of Hashes

by Miguel (Friar)
on Mar 25, 2005 at 23:08 UTC ( #442428=note: print w/ replies, xml ) Need Help??

in reply to Re: Generation of a Hash of Hashes
in thread Generation of a Hash of Hashes

"I'm trying to figure out for what task this data structure would be convenient"

Thanks for your reply.

For this case, I have a file with information formated as I've posted above.

This is:
1 to 5 digits, 1 space, 1 to 65 characters

Each line represents classes and subclasses (and sub-sub-classes...) and their names.
Each digit represents one level.

For example:

11234 Some Text ^^^^^^^^^---- Name of this class (level) ^------- 5th class ^-------- 4th class ^--------- 3th class ^---------- 2nd class ^----------- Top (main class)

Classes' levels varies between 1 and 9.

I'm trying to use this Hash to create an XML document.

Comment on Re^2: Generation of a Hash of Hashes
Download Code
Replies are listed 'Best First'.
Re^3: Generation of a Hash of Hashes
by tilly (Archbishop) on Mar 26, 2005 at 01:22 UTC
    I'd suggest trying to write code to produce the XML document and only then figure out what data structure you need to do it. (There are so many variations in what XML can look like that your task doesn't tell me what a good data structure would be for your problem.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://442428]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2016-05-27 20:22 GMT
Find Nodes?
    Voting Booth?