On this Page

    _xml

    (Merge only)

    Convert -filter data to XML.

    Description

    _xml is a pre-defined JavaScript object that can be used to convert non-XML data to XML format within Merge. This feature is available only when using a JavaScript script filter to process non-XML data within Merge (see the JavaScript Filters section for details). Writing data using the _xml object creates a temporary XML file that Merge will subsequently use as the "real" data file to merge with a document template. See the XmlFile Class (Write XML Files) description of the functions that are available.

    Example

    _xml.tag("Header");
    _xml.Name = "Wayne Hall";
    _xml.Phone = "613-555-1515";
    _xml.Address = {Addr1:"2525 Circle Crescent",
     				Addr2:"Ottawa",
     				Addr3:"Canada"};
    _xml.endTag();

    Will create the following XML:

    <Header>
    	<Name>Wayne Hall</Name>
    	<Phone>613-555-1515</Phone>
    	<Address>
    		<Addr1>2525 Circle Crescent</Addr1>
    		<Addr2>Ottawa</Addr2>
    		<Addr3>Canada</Addr3>
    	</Address>
    </Header>

    See Also

    XmlFile Class (Write XML Files)