The objective of this class is to allow both a mapping of an object as an XML, in order to perform various transformations according to the needs of the developer.
The first thing is to read either an object or an XML file using the methods of the class which ubRoot nothing more than a more specialized class.
$ root = ubRoot: load_object ($ t_a); => returns an object ubRoot
$ root = ubRoot: load_xml ( "node.xml"); => returns an object ubRoot
After having already been the object ubRoot can obtain information at any of the formats allowing further that if an XML can be given directly to the address where you want to be saved.
And said the goal is to explain how to work with the class and specify certain characteristics that make it possible to read the object
1. Of the objects will be taken only the result of the methods that start with "get__" then the attribute name, but the prefix can be changed if desired.
2. In the same way to introduce the values of the class is a necessary method for each attribute you want to use that method must be prefixed "set__", which as in the case of get__ can be changed
3. The objective of using a different code to "get" that is because we are used as a general parameters that we are no map or are recorded in an XML, either because they are measurable or because what saved them is an identifier .
The important thing is that it allows great flexibility in developing the data when choosing a class that wants to be map
4. In case of the array is mapped all the information as appropriate. The keys of the settlement are represented as an internal node where the name would be the same key in whether, if the numerical values are taken to a string in the format "_ #" where # is the position in the settlement of this element .
5. Note that in cases where the object is to map out a class you are adding an attribute to this node, "ub_class_name" that represents the name of the class of that object.
6. Where to read an XML is within a node two nodes with the same name as it includes a settlement by that name as a key node and each would become a position of the settlement.
7. Where to read an XML is with several nodes named "_" take it as an arrangement where the name is the node that contains those that have the name "_" and each node of these will turn into a position within of that settlement.
8. Where to read an XML is a node that has an attribute "ub_is_array" will take it as a node at one position