Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Object Definition

XmlParser Object Description

This class represents an XML parser. To parse XML data you create an instance of this class and then use the method on the resulting object to build and manipulate a DOM like model of some XML data.

Methods

XmlParser.mode() Configures how the parser will interpret data.
XmlParser.build() Build an XML tree from some XML source.
XmlParser.thisTag() Return the current 'context' XML element.
XmlParser.clean() Clean the contents of the XML parser.
XmlParser.loadSyntax() Load a set of parsing rules.
XmlParser.execute() Re-execute part of an XML tag tree. Each note gets to re-evaluate its contribution to the document being generated. ADVANCED.
XmlParser.bodytext() Generate the text representation of the XML subtree. ADVANCED.
XmlParser.text() Generate the text representation of the XML subtree. ADVANCED.

Object Properties

Name Type/Value Range/Length Description
removeCommentsbool  Optional, default = true
This is a control flag used to modify the behaviour of the parser when it builds the internal XML representation of a document. If this flag is set (true) the parser will filter all XML comments from the DOM.
removeWhitespacebool  Optional, default = true
This is a control flag used to modify the behaviour of the parser when it builds the internal XML representation of a document. If this flag is set (true) the parser will remove whitespace between adjacent tags (or the end on one tag and the start of the next). Whitespace is *only* removed *if* there is only whitespace separating the tags.
removeDeclsbool  Optional, default = true
This is a control flag used to modify the behaviour of the parser when it builds the internal XML representation of a document. If this flag is set (true) the parser will filter all XML declarations from the DOM. Declarations are of the form:
<!Xml Declaration>
removeProcInstbool  Optional, default = true
This is a control flag used to modify the behaviour of the parser when it builds the internal XML representation of a document. If this flag is set (true) the parser will filter all XML comments from the DOM.
rootstruct XmlParser.XmlTagsee definition Required. This is the 'root' of the XML tree. The root is the 'virtual' XML tag element that contains all the top level elements that exist within the document being processed.
errorsarray of strings  Required. This property is created after calling XmlParser.build()if constructing the tree generated any parsing errors.

Whitebeam release 1.3.36
(loadtime : 31ms)