4Suite™ API Documentation

# ► Module Ft.Xml.Lib.XmlString

Miscellaneous XML-specific string functions

    Copyright 2005 Fourthought, Inc. (USA).
    Detailed license and copyright information: http://4suite.org/COPYRIGHT
    Project home, documentation, distributions: http://4suite.org/

Functions: IsNCName, IsName, IsNmtoken, IsQName, IsXml, IsXmlSpace, SplitQName, XmlStrLStrip, XmlStrRStrip, XmlStrStrip |  |  |  | Globals: CAPI

## Functions

IsNCName(s)
  IsNCName(s) -> bool

      Returns True if the given string matches the NCName production as defined
      by the W3C's Namespaces in XML Recommendation.

IsName(s)
  IsName(s) -> bool

      Returns True if the given string matches the Name production as defined
      by the W3C's XML 1.0 Recommendation.

IsNmtoken(s)
  IsNmtoken(s) -> bool

      Returns True if the given string matches the Nmtoken production as defined
      by the W3C's XML 1.0 Recommendation.

IsQName(s)
  IsQName(s) -> bool

      Returns True if the given string matches the QName production as defined
      by the W3C's Namespaces in XML Recommendation.

IsXml(S)
  IsXml(S) -> bool

      Return True if the given bytes represent a (possibly) well-formed XML
      document. (see http://www.w3.org/TR/REC-xml/#sec-guessing).

IsXmlSpace(S)
  IsXmlSpace(S) -> bool

      Return True if there are only whitespace characters in S, False otherwise.

SplitQName(qualifiedName)
  SplitQName(qualifiedName) -> (prefix, localName)

      where 'qualifiedName' is a QName according to XML Namespaces 1.0
      <http://www.w3.org/TR/REC-xml-names>.
      returns the name parts according to the spec.

XmlStrLStrip(S)
  XmlStrLStrip(S) -> unicode

      Return a copy of the string S with leading whitespace removed.

XmlStrRStrip(S)
  XmlStrRStrip(S) -> unicode

      Return a copy of the string S with trailing whitespace removed.

XmlStrStrip(S)
  XmlStrStrip(S) -> unicode

      Return a copy of the string S with leading and trailing whitespace removed.

## Globals

CAPI = <PyCObject object at 0x800d50850>