The Great Oxen of XML -- Objective XML (OX)
The Great Oxen of XML -- Objective XML (OX)
I was sitting on the john thinking of a way to store CAD Data in a very easy to read method. I am working on a robot similar to that of the old drawing robots, but it builds instead of drawing. It works similar to that of a printer... it will have a set size, and like your laser jet right next to you spits out paper, it will spit out concrete or similar building material one "pixel" at a time. That is for another post though, as for this one, here is something I have come up with as a relational XML with object orientation.
<!-- OX -- Objective XML -->
<ox>
<shape id="square" params="x,y,h,w">
<sides>
<side id="s1" x1="this.parent.x" y1="this.parent.y" x2="...".../>
<side id="s2" x1="s1.x1" y1="s1.y1" .../>
...
</sides>
</shape>
</ox>
It is can be relational as you see, you can call properties from other elements, and it allows for inheritence. Granted this is not fully Object Oriented, it is a step closer.
What I have up there is an abstract of a square object... you will be able to inherit that like so:
What I have up there is an abstract of a square object... you will be able to inherit that like so:
<!-- OX -- Objective XML inheritance -->
...
<shape inherit="square" pass="10,10,50,50" />
...
<shape inherit="square" pass="10,10,50,50" />
Thus, creating an entire data entity, which with standard XML would take all the lines above this for each one. For this very basic dataStructure, that woul be 8 lines for every entry into the database.