1 XML Support
IDM XML support allows for the processing of XML Documents in the Rule Language. The main components include the new object classes document and doccursor, which are described in the following sections.
The functionality of XML transformation builds on the XML interface and consists of the objects transformer and mapping. It serves for transformation of XML files to IDM objects and attributes and vice versa.
XML and the Document Object Model
(DOM), which defines an object model and an interface for the access of XML Documents, are standards of the World Wide Web Consortium (W3C). The specifications are available on the W3C website (www.w3c.org/XML, www.w3c.org/DOM).
1.1 XML Support on Microsoft Windows
Microsoft XML Core Services (MSXML) Version 3.0 or higher is required.
1.2 XML Support on Unix
The XML interface is available from IDM version A.05.02.d for Unix platforms that support libxml2 and libxslt.
These are the platforms:
- Solaris (version 7 and above)
- HP-UX 11.0 11.23 (32-bit)
- AIX 5.1
- Redhat6.1, Redhat8
- RHEL4 i386 & x86_64
- Suse 9.1
Please note that version 2.7.2 (HP-UX: 2.7.3) or higher of the libxml2 libraries has to be installed on the system. To use Transformer objects the libxslt library 1.1.24 has to be available. The libraries don’t have to be explicitly linked but they should be in the library search path (depending on the platform LD_LIBRARY_PATH, SHLIB_PATH, LIBPATH) or directly linked while building an IDM application. The attributes .idispatch and .ixmldomdocument2 return the xmlDocPtr and xmlNodePtr respectively xmlAttrPtr depending on the linked libxml2 library. Setting these attributes is not allowed.
1.3 Differences Between the Windows and Unix Implementations
- The processing instruction xml is not treated as an distinct node of the DOM by libxml2. This has influence on the path, the traversing with :select as well as saving the documents.
- The handling of spaces may be different. The libxml2 library is used with keepBlanksDefault = 0 to avoid unnecessary text nodes caused by node indentation or line breaks. Through this a behavior as similar as possible to the Windows implementation is achieved.
- When reading out the attribute .text and saving a formatted document there are small differences between MSXML and libxml2 regarding indentation, line breaks and spaces.