in

The ORM Foundation

Get the facts!

.orm xml structure

Last post 08-25-2012 8:57 by rik.vanmechelen. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-12-2012 8:59

    .orm xml structure

    I am trying to parse the .orm file's xml structure in ruby. Is there any documentation on the structure of the xml? thank you all in advance
  • 08-13-2012 10:35 In reply to

    Re: .orm xml structure

    If you use the search term "orm xml" or similar, you will see several posts about the XML file structure.

    For example this one:

    http://www.ormfoundation.org/forums/p/806/2495.aspx#2495

     

    Ken


  • 08-13-2012 12:01 In reply to

    Re: .orm xml structure

    thank you very much for your reply.

    Rik

  • 08-15-2012 18:47 In reply to

    Re: .orm xml structure

    My ActiveFacts toolset loads much of the XML content of an ORM file, using the Ruby programming language. I use the nokogiri XML parser (which is based on libxml/expat) to load the entire ORM file to a DOM-like tree, then use XPath queries and other traversals to extract different kinds of information, as you can see in the source code here. Currently I extract all object types, non-derived fact types and constraints, and optionally, the diagram layouts (though my interpretation of the exact positioning of the shapes is inaccurate).

    If you want to make use of the information I extract, you could install Ruby and ActiveFacts and write a generator to emit information from my compiled version of the model. You can see my existing generators here - just copy one and change it to suit your needs. You might find it easier to do that than to write a program which works directly from the ORM XML.

    Clifford Heath, Data Constellation, http://dataconstellation.com

    Filed under: , , ,
  • 08-25-2012 8:57 In reply to

    Re: .orm xml structure

    Thank you very much for this information. I started doing it with nokogiri as well (before my first post). At first glance this looks like something i could use. I might base part of my code of yours. It is for my masters thesis, and i will of course mention you (at least in the code base.)

Page 1 of 1 (5 items)
© 2008-2013 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service