A method for generating an XML file having a nesting structure equivalent
to the topology structure of an object in an image. Under the method, the
topology of an object having a structure including multiple binary
branches is traced, while XML elements representing nodes and describing
attributes and configuration of the structure are simultaneously
generated. This produces an XML file having a nesting structure
describing the topology structure of the object. Attributes are added to
the nodes in the XML file that specify rotations and transformations of
line elements such that the geometry of the skeleton is specified. The
XML file is generated in such a manner that it may be rendered as a
scalar vector graphics file. The generated XML file may be used in
further processing to store attributes representing physical properties
of the structure without requiring a location referencing system.