Table of Contents

Module: xmlutil /amd/bernoulli/1/home/abt_vin/georgi/hmm/0.7/ghmm//ghmmwrapper/xmlutil.py

XML format support for the GHMM library.

Imported modules   
from DataStructures import Point2D, EdgeWeight
import EditObjectAttributesDialog
from EditObjectAttributesDialog import EditObjectAttributesDialog, ValidatingString, ValidatingInt, ValidatingFloat, PopupableInt, Probability, DefaultedInt, DefaultedString
from Graph import Graph, SubGraph
import copy
import logging
import string
import sys
import types
import whrandom
from xml.dom.minidom import *
Functions   
csvFromList
listFromCSV
removeEmptyTextNodes
toprettyxml
typed_assign
writeContents
writeData
writeXMLData
writeXMLTextNode
  csvFromList 
csvFromList ( list,  perRow=None )

  listFromCSV 
listFromCSV ( s,  type )

  removeEmptyTextNodes 
removeEmptyTextNodes ( XMLNode )

  toprettyxml 
toprettyxml ( XMLDoc )

Notice for this function: minidom.Element.toprettyxml is not so pretty and its output format is not compatible with XMLIO parser. The particular problem with minidom.toprettyxml is that it put the text data of a text node on a new line, instead of immediately after the element tag. Because XMLIO cannot parse this format, thus we need our own pretty print program

  typed_assign 
typed_assign ( var,  val )

  writeContents 
writeContents (
        XMLDoc,
        XMLNode,
        data,
        )

  writeData 
writeData (
        XMLDoc,
        XMLNode,
        dataKey,
        dataValue,
        )

  writeXMLData 
writeXMLData (
        XMLDoc,
        XMLNode,
        dataKey,
        XMLData,
        )

  writeXMLTextNode 
writeXMLTextNode (
        XMLDoc,
        XMLNode,
        keyName,
        XMLData,
        )

Classes   

AlphabetErrorType

DOM_Map

DiscreteHMMAlphabet

HMM

HMMClass

HMMEdError

HMMState

NamedDistributions

NotValidHMMType

TransitionFunction

this class holds information on the function which determines the

XMLElementWriter


Table of Contents

This document was automatically generated on Fri Jan 20 14:56:59 2006 by HappyDoc version WORKING