eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::DOM_SAXDriver':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: DOM_SAXDriver (in XML)


Inheritance:

   Object
   |
   +--XML::SAXDriver
      |
      +--XML::DOM_SAXDriver

Package:
stx:goodies/xml/vw
Category:
XML-VW-SAX
Version:
rev: 1.10 date: 2024/04/23 17:00:23
user: cg
file: DOM_SAXDriver.st directory: goodies/xml/vw
module: stx stc-classLibrary: vw

Description:


This class represents a specialized type of SAX (Simple API for XML) processor that follows the 'object model' for processing XML documents to build a Document Object Model (DOM) tree from the processed XML document.

Note: This class implementation is not yet complete

Instance Variables:
	stack   <OrderedCollection>
	document        <XML.Document>


Instance protocol:

characters
o  characters: aString
(comment from inherited method)
This method is used report character data of an entity.
Character data with ignorable whitespace of a single entity is divided into parts. Each
part is reported by its own call to this method. The ignorableWhitespace method is sent
called between calls to this method. All white space separating parts of the text is passed
to the ignorableWhitespace method.
aString does not have any leading or trailing white space.

document events
o  document

o  endDocument
(comment from inherited method)
Indicates that the parser has finished the document

o  endDocumentFragment

o  startDocument
(comment from inherited method)
Indicates the start of a document

o  startDocumentFragment

elements
o  endElement: localName namespace: nameSpace prefix: nameSpacePrefix
(comment from inherited method)
indicates the end of an element. See startElement

o  startElement: localName namespace: nameSpace prefix: nameSpacePrefix attributes: atts
(comment from inherited method)
Receive notification of the beginning of an element.

Parameters:
localName <String> - The local name of the element(without prefix)
namespace <String> The Namespace URI, Nil if the element has no Namespace URI
prefix <String> Prefix of the tag name used to indicate a namespace. Nil if absent
attributes <OrderedCollection of Attribute (XML::Attribute)> The attributes attached to the element.

Example (note two single quotes were used instead of a double quote char)
<doc xmlns=''http://www.doc.org/'' xmlns:other=''http://www.other.com/''>
<a>A text</a>
<other:b>BA text</other:b>
<c other:cat=''meow''>C text</c>
<d xmlns=''http:/nested/''></d>
</doc>

Parameter values to this method for each element of the above XML:

local name: 'doc' namespace: 'http://www.doc.org/' prefix: ''
local name: 'a' namespace: 'http://www.doc.org/' prefix: ''
local name: 'b' namespace: 'http://www.other.com/' prefix: 'other'
local name: 'c' namespace: 'http://www.doc.org/' prefix: ''
local name: 'd' namespace: 'http:/nested/' prefix: ''

Note the attribute object also have namespaces

other
o  comment: data
(comment from inherited method)
Receive notification of comment in element content.

Parameters:
aString - the comment

o  processingInstruction: target data: data

private
o  createElement: name attributes: attr



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:50:09 GMT