4Suite™ API Documentation

# ► Module Ft.Xml.ThirdParty.Xvif.xmlcomp

# $Header: /var/local/cvsroot/4Suite/Ft/Xml/ThirdParty/Xvif/xmlcomp.py,v 1.3 2004/10/12 22:59:14 uogbuji Exp $

Classes: XmlComp |  |  |  | Functions: normalize_space |  |  |  | Globals: XMLNS_NAMESPACE, ascii_letters, ascii_lowercase, ascii_uppercase, digits, hexdigits, letters, lowercase, octdigits, printable, punctuation, uppercase, whitespace

## Classes

class XmlComp
  A "checkType" can be a DOM nodeType, ie "An integer representing the node type. Symbolic constants for the types are on the Node object: ELEMENT_NODE, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE(**), ENTITY_NODE(*), PROCESSING_INSTRUCTION_NODE(*), COMMENT_NODE(*), DOCUMENT_NODE(*), DOCUMENT_TYPE_NODE(*), NOTATION_NODE(*)" or the extra values: "NAMESPACE_PREFIX,WHITESPACES, NAMESPACE_DECLARATION".

      (*): not supported (yet)
      (**): use TEXT_NODE instead.

  ### Methods

  __init__(self, d1=None, d2=None, checks=[1, 2, 3, 1j, 2j, 3j])
  addCheck(self, check)
  compare(self, d1=None, d2=None)
  compareAttributes(self, n1, n2)
  compareElements(self, n1, n2)
  compareNamedNodeMaps(self, nodes1, nodes2)
  compareNode(self, n1, n2)
  compareNodes(self, nodes1, nodes2)
  compareText(self, n1, n2)
  removeCheck(self, check)
  removeJunk(self, nodes)
  removeJunkFromNamedNodeMap(self, nodes)
  setDocument1(self, d1)
  setDocument2(self, d2)

  ### Members

  EMPTY_TEXT = 4j
  NAMESPACE_DECLARATION = 2j
  NAMESPACE_PREFIX = 1j
  WHITESPACES = 3j
  compareFunctions = {1: <function compareElements>, 2: <function compareAttributes>, 3: <function compareText>}

## Functions

normalize_space(s)

## Globals

XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
ascii_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
digits = '0123456789'
hexdigits = '0123456789abcdefABCDEF'
letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
lowercase = 'abcdefghijklmnopqrstuvwxyz'
octdigits = '01234567'
printable = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c'
punctuation = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
whitespace = '\t\n\x0b\x0c\r '