|
Whitebeam Template Reference Documentation
|
XmlParser Template
mode()
Configures how the parser will interpret data.
Syntax
void = rb.XmlParser.mode(xmlMode)
Parameters
The 'mode' method takes 1 parameter:
Name | Type/Value | Range/Length | Description | xmlMode | number | XmlModeXML, XmlModeHTML, XmlModeHybrid | Required.
The operational mode to be used by the parser. Use the symbolic names described in the table below.
|
Results
The 'mode' method returns no useful information.
Remarks
The Whitebeam XML parser can operate in one of three core operational modes -
depending on the requirements of the application. Each of these modes has slightly different
characteristics - the possible modes are:
Mode | Behaviour |
---|
XmlModeXML | Default. The parser enforces strict XML rules. Primarily this disallows certain commopn HTML practices
including missing end-tags, empty attribute values. Case sensitive names for tags and attributes.
| XmlModeHTML | Assumes the data being parsed is HTML. This allows activities such as case insensitive tag names, missing end-tags,
Does NOT allow XML practices such as the empty tag representation of <tagname/> | XmlModeHybrid | Case insensitive names, allows missing end-tags, empty attribute values and the XML representation of an empty XML element.
This is the mode used by the internal processing of Presentation Pages. |
If you place the parser into either XmlModeHybrid or XmlModeHTML, the system loads a set of
syntax definitions into the parser that allows it to deal with HTML markup that is not XML conformant. For
example it tells the parser that <p...> trags do not require explicit end-tags.
|
|
(loadtime : 24ms) |