Example #1
0
 def setDocNodeLabel(self, graph_node, sLabel):
     """
     Set the DOM node label in the format-dependent way
     """
     try:
         sXmlLabel = self.dLabel2XmlLabel[sLabel]
     except KeyError:
         sXmlLabel = "other"
     graph_node.node.set(self.sLabelAttr, sXmlLabel)        
     # tagging using the custem XML attribute
     PageXml.setCustomAttr(graph_node.node, "structure", "type", sXmlLabel)