H
hurcan solter
i have an xml file that goes like;
<objectClass name="EmitterBeam" >
<attribute name="BeamElevationCenter" dataType="Float1"/>
<attribute name="BeamIdentifier" dataType="HLAoctet"/>
</objectClass>
at some point i need the look up the data type for different
attributes.
I can get the data type using a Xpath query in the form using REXML
node = $fom_file.elements["//attribute [@name = '#{attribute_name}']"]
it works okay, the thing is ,it takes ages (which is about ten
seconds)
so I have a mind to cache the attribute-datatype pairs in a hash for
faster lookup.
So can you guys tell me a simple and elegant way to do serialize
deserialize that hash to a file?
TIA
Hurcan Solter
<objectClass name="EmitterBeam" >
<attribute name="BeamElevationCenter" dataType="Float1"/>
<attribute name="BeamIdentifier" dataType="HLAoctet"/>
</objectClass>
at some point i need the look up the data type for different
attributes.
I can get the data type using a Xpath query in the form using REXML
node = $fom_file.elements["//attribute [@name = '#{attribute_name}']"]
it works okay, the thing is ,it takes ages (which is about ten
seconds)
so I have a mind to cache the attribute-datatype pairs in a hash for
faster lookup.
So can you guys tell me a simple and elegant way to do serialize
deserialize that hash to a file?
TIA
Hurcan Solter