def append(self, parent, content): object = content.value if self.optional(content) and footprint(object) == 0: return child = self.node(content) parent.append(child) for item in object: cont = Content(tag=item[0], value=item[1]) Appender.append(self, child, cont)
def append(self, parent, content): """ Append the specified L{content} to the I{parent}. @param content: The content to append. @type content: L{Object} """ object = content.value if self.optional(content) and footprint(object) == 0: return child = self.node(content) parent.append(child) for item in object: cont = Content(tag=item[0], value=item[1]) Appender.append(self, child, cont)
def append(self, parent, content): object = content.value if self.optional(content) and footprint(object) == 0: return child = self.node(content) parent.append(child) for item in object: if Matcher(Object) == item[1]: if item[0] in ("Path", "SearchExpression"): cont = Content(tag=item[1].__metadata__.sxbase.qname[0], value=item[1], type=item[1].__metadata__.sxtype) else: cont = Content(tag=item[0], value=item[1]) else: cont = Content(tag=item[0], value=item[1]) Appender.append(self, child, cont)