Packageorg.pranaframework.utils
Classpublic class XMLUtils

Contains utilities for working with XML objects.



Public Methods
 MethodDefined by
  
cdata(data:String):XML
[static] Creates a CDATA section for the given data string.
XMLUtils
  
convertAttributeToNode(xml:XML, attribute:String):XML
[static] Converts an attribute to a node.
XMLUtils
  
isElementNode(xml:XML):Boolean
[static] Returns if the given xml node is an element node.
XMLUtils
  
isTextNode(xml:XML):Boolean
[static] Returns if the given xml node is a text node.
XMLUtils
Public Constants
 ConstantDefined by
  ELEMENT_NODE_KIND : String = "element"
[static]
XMLUtils
  TEXT_NODE_KIND : String = "text"
[static]
XMLUtils
Method detail
cdata()method
public static function cdata(data:String):XML

Creates a CDATA section for the given data string. Use this method if you need to create a CDATA section with a binding expression in a literal XML declaration

Parameters
data:String — the data string to create a CDATA section from.

Returns
XML — a CDATA section for the data
convertAttributeToNode()method 
public static function convertAttributeToNode(xml:XML, attribute:String):XML

Converts an attribute to a node.

Parameters
xml:XML — the xml node that contains the attribute
 
attribute:String — the name of the attribute that will be converted to a node

Returns
XML — the passed in xml node with the specified attribute converted to a node
isElementNode()method 
public static function isElementNode(xml:XML):Boolean

Returns if the given xml node is an element node.

Parameters
xml:XML

Returns
Boolean
isTextNode()method 
public static function isTextNode(xml:XML):Boolean

Returns if the given xml node is a text node.

Parameters
xml:XML

Returns
Boolean
Constant detail
ELEMENT_NODE_KINDconstant
public static const ELEMENT_NODE_KIND:String = "element"
TEXT_NODE_KINDconstant 
public static const TEXT_NODE_KIND:String = "text"