Skip to content

Best Practices Wiki

Eric Jahn edited this page Jan 3, 2014 · 9 revisions

Handling large XML

  • Use a streaming event-based parser (like StaX for Java) with look-ahead capability to avoid reading the whole XML file into memory. The event-based parser only uses a small amount of memory to store the section of XML it is processing, moving quickly through the file to find what it is programmed to looked for. Look-ahead capability avoids multiple reads when a certain subelement is desired.

  • Shred into a database. Many libraries exist to create a temporary or long-term relational persistent store of the XML data. Look-ups are then fast and efficient. Delete the relational tables when you are done processing the XML, if logs aren't needed.

Operational Use of HMIS XML

  • Use web services with an Application Programming Interface (API)
    • Two main types of web service
    • An API is a cookbook (not software) for things like "add client record", "get client record"
      • There is no standard HMIS API, though non-standard ones are in use between systems. An unofficial provider/vendor neutral email listserv and forum for this topic is here.

Clone this wiki locally