Ejemplo n.º 1
0
 def handle_comment(self, data):
     cmt = POM.Comment(data)
     try:
         self.stack[-1].append(cmt)
     except IndexError:  # comment is outside of root node
         self.comments.append(cmt)
Ejemplo n.º 2
0
 def test_1CommentEncoding(self):
     cmt = POM.Comment("some ------- comment-")
     self.assert_(str(cmt) == '<!-- some - - - - comment- -->')