XMLFragment

From XBRLWiki
Jump to navigationJump to search

[XMLFragment javadoc page]

Description

An XMLFragment is a container for XML representable content inside the XBRL Reporting Standard API. An XMLFragment is always serializable to its surrounding XML representation consisting on elements, attributes, children elements etc.

How to create an instance of an XMLFragment

While it is rare the case a user application requires to create an XMLFragment directly, the XMLFragment object can be created by calling any of the three available construction methods.

  1. Creating an empty XMLFragment. The user can do a call to [XMLFragment(com.ihr.xbrl.om.DTSContainer)] and create a new empty XMLFragment. For populating the XMLFragment with the content of an XdmNode a subsequent call to setDocument(XdmNode) is sufficient.
  2. Creating a copy of another XMLFragment in a different DTSContainer can be performed by calling [XMLFragment(com.ihr.xbrl.om.DTSContainer, com.ihr.xbrl.om.XMLFragment)].
  3. Creating an XMLFragment as a copy of another XMLFragment can be done by calling the [XMLFragment(com.ihr.xbrl.om.XMLFragment)] constructor.

Usage

The API create XMLFragment instances while reading the DTS from the surrounding files. The XMLFragments are then converted into the appropriate objects when needed by the API. The properties of the XMLFragment allows the API to access to the XML node attributes and to populate the required XML attributes when it is needed in order to write an XML file on disk. The XMLFragment object is considered a low level object in the API. The user is encouraged to use high level objects rather than low level objects in order to facilitate the development of applications.

The XMLFragment object contains also all required indexed capabilities in order to hold relationships from other objects in the API. The user can then ask any AML fragment about the relationships this XMLFragment is source and the relationships this XMLFragment is target. The consistency about adding and deleting relationships to the DTS is implemented at the API level.

What's inside an XMLFragment

TODO

Navigation

Main Page | XBRL API related discussions