Introduction to XML Virtual Documents
InterSystems IRIS® data platform provides support for XML documents as virtual documents. A virtual document is a kind of message that InterSystems IRIS parses only partially. This kind of message has the standard production message header and the standard message properties such as ID, Priority, and SessionId. The data in the message, however, is not available as message properties; instead it is stored directly in an internal-use global, for greater processing speed. InterSystems IRIS provides tools so that you can access values in virtual documents, for use in data transformations, business rules, and searching and filtering messages.
Choosing How to Handle XML Documents as Messages
When using XML documents as messages within a production, it is important to consider the benefits and drawbacks of two possible approaches:
-
Handling them as virtual documents as described here.
-
Handling them as standard messages, where all elements and attributes in the document are mapped to properties in the message classes. See Using XML-enabled Objects Instead of Virtual Documents.
Virtual documents have the benefit of not requiring message classes that contain large numbers of properties you might not need. In the case of large XML documents, virtual documents have the drawback that when you use virtual property paths, you would need to plan carefully to avoid the system-wide long string limit. That is, when referring to a specific part of the XML document, you may obtain a string value that is too long for the system to handle, or you may construct a string that is too long for the system to handle. (This limitation is present for all virtual document types but is much more likely with XML documents, because they tend to be much larger than other kinds of virtual documents like X12 messages.)
Standard messages have the benefit that every value is easily visible and accessible for use in BPL and DTL, without special syntax, and issues with long strings are much less common. Standard messages have the drawback that you need to define message classes that correspond appropriately to the XML documents, and they may contain properties you do not need.