Rending of XML is done with a small list of functions that execute quickly and leave the layout of the final document flexible. Since ShofarNexus uses POX (Plain Old XML) the functionality for the complex features of XML are not supported. However, since the output is rendered using the Manifest’s Phrase, any custom output can be interspersed in the output. The output is generated in the processing of a Manifest and place in the Manifest’s Render . In keeping with the POX mentality functions are available to generate Elements and Attributes. While text can be output as part of an Element using the Manifest’s Phrase, this is not used as a normal part of a ShofarFile. Element Functions Elements always start with the opening tag and is rendered with the Manifest_XML_Element_Begin function. Zero or more Attributes are then rendered using the Attribute functions. A simple or empty Element, one with no sub-elements or text, can be closed with Manifest_XML_Element_Begin_Empty. A complex Element, one with sub-elements or text, requires the opening element to be closed using Manifest_XML_Element_Begin_Close. Sub-elements are then rendered and the original element is then closed with Manifest_XML_Element_End. Attribute Functions Attributes can be manually or as a single function. To manually render an Attribute the Manifest_XML_Attribute_Begin function is called with the Attribute’s key. The Attribute’s value is then rendered using the Manifest’s Phrase. The attribute is then closed with Manifest_XML_Attribute_End. To simplify the process a variety of functions combine this into a single call, such as for an Int32 (Manifest_XML_Attribute_Int32) or String value (Manifest_XML_Attribute_String). |