locked
xml ,xsl and sincronization xml RRS feed

  • Question

  • Hello. I'm creating an application that comunicates with an unique xml file(a format for architecture , ifc) from allplan to my application and from my application to allplan. For do that i must 1)create object classes with xsd. 2)import ifc xml file from allplan and population object classes (deserialization) 2)modify some data in my object classes 3)regenerate the xml with my changes and reimport it in allplan . I think to accumulate change in an object from my object classes(i can use for ex an observer for transfer commands from object to a central class with all modifications?)create and use an xsl with for example an id of entity and the value to set added by the observer. Is a right scenario? advices?link?

    I'm search for a good and fast metod for sincronyze xml document.

    anoter think is to change a dom document with xpath , but is possible to change values in xml without load the xml entirely in memory?

    because the file size of the xml can exceed 200 MB

    thanks.


    Tuesday, May 3, 2011 10:38 AM

Answers

  • Generating XSL to modify XML is a good idea but you need to take care (copy) all nodes you don't want to touch. Maybe xpath + new value is easier to be used to update XML based on a DOM.

    To update XML without loading the xml entirely, you could use a pull-based parser like XmlLite or XmlReader, but XPath is not supported. Some extensions like XPathReader is available for that purpose. Anyway, if the xpath hits the latest node of XML, it's inevitable to load whole XML.

     

    Wednesday, May 4, 2011 1:13 PM