[[Dashboard | << Back to Dashboard ]] {| align="right" | __TOC__ |} = Exploring the XMLConverter Plugin = == Overview == A utility tool that can marshall data to XML == arrayToXML == Converts an array into XML with no headers. === Returns === * This function returns ''string'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | data || array || Yes || --- || The array to convert |- | useCDATA || boolean || No || false || Use CDATA content for ALL values. False by default |- | rootName || string || Yes || || The name of the root element, else it defaults to the internal defaults. |} === Examples === == toXML == Convert any type of data to XML. This method will auto-discover the type. Valid types are array,query,struct === Returns === * This function returns ''string'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | data || any || Yes || --- || The data to convert to xml |- | columnlist || string || No || --- || Choose which columns to inspect, by default it uses all the columns in the query, if using a query |- | useCDATA || boolean || No || false || Use CDATA content for ALL values. The default is false |- | addHeader || boolean || No || true || Add an xml header to the packet returned. |- | encoding || string || Yes || UTF-8 || The character encoding of the header. UTF-8 is the default |- | delimiter || string || No || , || The delimiter in the list. Comma by default |- | rootName || string || Yes || || The name of the root element, else it defaults to the internal defaults. |} === Examples === == structToXML == Converts a struct into XML with no headers. === Returns === * This function returns ''string'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | data || any || Yes || --- || The structure, object, any to convert. |- | useCDATA || boolean || No || false || Use CDATA content for ALL values |- | rootName || string || Yes || || The name of the root element, else it defaults to the internal defaults. |} === Examples === == objectToXML == Converts an object(entity) into XML by inspecting its properties and then calling the appropriate getters on it. === Returns === * This function returns ''string'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | data || any || Yes || --- || The structure, object, any to convert. |- | useCDATA || boolean || No || false || Use CDATA content for ALL values |- | rootName || string || Yes || || The name of the root element, else it defaults to the internal defaults. |} === Examples === == queryToXML == Converts a query to XML with no headers. === Returns === * This function returns ''string'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | data || query || Yes || --- || The query to convert |- | CDATAColumns || string || No || || Which columns to wrap in cdata tags |- | columnlist || string || No || [runtime expression] || Choose which columns to include in the translation, by default it uses all the columns in the query |- | useCDATA || boolean || No || false || Use CDATA content for ALL values |- | rootName || string || Yes || || The name of the root element, else it defaults to the internal defaults. |} === Examples ===