Background
XML
XML is the eXtensible Markup Language, a way of encoding data in a file with markup that explains to readers what the data represents.
XML is a widely used standard for data exchange. The standard is maintained by the World Wide Web consortium. Many tools are available that allow software to read and exchange data in XML files.
Why XML
The eLandings system is focused on creating and receiving reports. It is primarily a rule based system, applying rules to reports to let the user know whether or not they are correct, rather than a workflow based system where documents are built up through many operations.
The use of XML provides both the eLandings development team and 3rd parties with many options in terms of tools. XML is language agnostic, and provides good interoperatability.
How XML is used in eLandings
The eLandings system uses XML documents as its primary data aggregate. The same XML format used by third parties to transmit landing reports to the system is used internally to pass reports between system components. This greatly increases the reliability of the XML rendering process. Data extracted from the database and rendered as an XML document is rendered correctly, because the entire system uses those XML documents and any bug introduced into this process is found and fixed quickly.
XML documents are not a system boundary, and don't require special boundary translation and testing.
XML data exchange for third parties
Import vs. Export
The eLandings system provides two options for third party interfacing systems. The third party system can collection and validate all the needed data, and create the XML document for import into eLandings. In this case the eLandings validation rules serve as a double check to insure that all data needed is present and valid. When creating documents for import the third party system can either use placeholder landing report IDs and fish ticket numbers, or can acquire real report IDs and fish ticket numbers from eLanding and use those. Importable numbers are a weak point in the system because they can be inadvertently reused. Third party systems that use this approach must handle numbers very carefully to avoid unintended results.
Alternately, seafood processors can enter reporting data into eLandings, then export it as an XML document for induction into their own business system. In that case, the third party system is assured that the data being inducted is valid and correctly formatted.
XML Data
XML documents produced by eLandings can be observed to contain many elements and attributes, documenting the entire landing report.
Elements are data items that provide information to eLandings. Attributes are information that eLandings provides as feedback that amplifies the data. For example,
<port_of_landing ifq_port_code="168" name="Sitka">SIT</port_of_landing>
is the port_of_landing XML element. It provides the port code "SIT". The attributes associated tell any person or system reading the document (but not eLandings) that the code represents the port of Sitka, and that the NMFS IFQ port code for Sitka is 168. The eLandings system never reads attributes, and they should never be used to try to convey information to the system. The eLandings system reads only the element data, and is able to derive the attributes itself.