Jacob Kroon wrote:
> I'm writing a block-diagram editor, and could use some tips about
> writing/reading
> diagrams to/from an xml file format. The basic layout of my code :
>
> class Diagram {
> Blocks blocks[]
> }
>
> class Block {
> int x, y
> }
>
> class Square(Block) {
> int width,
[Jacob Kroon]
> I'm writing a block-diagram editor, and could use some tips about
> writing/reading
> diagrams to/from an xml file format.
I highly recommend reading David Mertz excellent articles on the
conversion of objects to xml and vice-versa.
On the 'Pythonic' treatment of XML documents a
I'm writing a block-diagram editor, and could use some tips about
writing/reading
diagrams to/from an xml file format. The basic layout of my code :
class Diagram {
Blocks blocks[]
}
class Block {
int x, y
}
class Square(Block) {
int width, height
}
class Circle(Block) {
int ra