IsXMLElem

Determines whether the function parameter is an ELEMENT node of an XML doc.

Method Signature

IsXMLElem(value=[any])

Arguments

Argument
Type
Required
Description
Default

value

any

true

Value to test

Examples

Check if given path is an XML element

<bx:xml variable="example">
	<boxlangengines>
		<engine>
			<name>Adobe ColdFusion</name>
		</engine>
		<engine>
			<name>Boxlang</name>
		</engine>
		<engine>
			<name>Railo</name>
		</engine>
		<engine>
			<name>Open BlueDragon</name>
		</engine>
	</boxlangengines>
</bx:xml>
<bx:script>
	writeOutput( isXMLElem( example.BOXLANGENGINES ) );
</bx:script>

Result: YES

Additional Examples

<bx:xml variable="xmlobject">
	<office>
		<employee>
			<emp_name>boxlang_dev</emp_name>
			<emp_no>121</emp_no>
		</employee>
	</office>
</bx:xml>
<bx:dump var="#IsXmlElem( xmlobject.OFFICE )#"/>

Last updated

Was this helpful?