Tag Class
Name: Tag
Description:
- * Tag class provides a base for parsing, modifying, outputting and creating XML tags
Package: org.active-link.xml
Author: Zurab Davitiani
Version: 0.4.0
See: XML
All Methods
Tag
attributeExists
getTagAttribute
getTagContent
getTagName
getTagString
getTagStringBegin
getTagStringEnd
removeAllAttributes
removeAttribute
resetTag
setAttribute
setTagContent
setTagFormat
setTagFormatEndTag
setTagFromString
setTagName
Tag
( optional string name, optional string content )
Description:
- * Constructor creates a tag object with the specified name and tag content
Returns: none
Arguments:
- optional string name
- optional string content
attributeExists
( string attrName )
Description:
- * Find out whether attribute exists
Returns: true if attribute exists, false otherwise
Arguments:
getTagAttribute
( string attrName )
Description:
- * Get attribute value by its name
Returns: string attribute value
Arguments:
getTagContent
( )
Description:
Returns: string tag content
getTagName
( )
Description:
Returns: string tag name
getTagString
( )
Description:
- * Get complete tag string with its attributes and content
Returns: string tag string
getTagStringBegin
( )
Description:
- * Get beginning of the tag string, i.e. its name attributes up until tag contents
Returns: string beginning of the tag string
getTagStringEnd
( )
Description:
- * Get ending of the tag string, i.e. its closing tag
Returns: string close tag if tag is not short-handed, empty string otherwise
removeAllAttributes
( )
Description:
- * Remove all tag attributes
Returns: none
removeAttribute
( )
Description:
- * Remove a tag attribute by its name
Returns: none
resetTag
( )
Description:
- * Reset the tag object - set name, content to empty strings, and reset all attributes
Returns: none
setAttribute
( string attrName, string attrValue )
Description:
- * Create or modify an existing attribute by supplying attribute name and value
Returns: none
Arguments:
- string attrName
- string attrValue
setTagContent
( string content )
Description:
- * Set contents of the tag
Returns: none
Arguments:
setTagFormat
( int tagFormat, optional int tagFormatIndentLevel )
Description:
- * Set tag formatting option by specifying tagFormat to 0 (none), or 1 (indented)
Returns: none
Arguments:
- int tagFormat
- optional int tagFormatIndentLevel
setTagFormatEndTag
( optional boolean formatEndTag )
Description:
- * Set whether closing of the tag should be formatted or not
Returns: none
Arguments:
- optional boolean formatEndTag
setTagFromString
( string tagString )
Description:
- * Parse a string containing a tag into the tag object, this will parse the first tag found
Returns: array array of [0]=>index of the beginning of the tag, [1]=>index where tag ended
Arguments:
setTagName
( string name )
Description:
Returns: none
Arguments: