Return a new ``<p:cxnSp>`` element tree configured as a base
        connector.
434310
def new_cxnSp(cls, id_, name, prst, x, y, cx, cy, flipH, flipV):
        
        tmpl = cls._cxnSp_tmpl()
        flip = (
            (' flipH="1"' if flipH else '') + (' flipV="1"' if flipV else '')
        )
        xml = tmpl.format(**{
            'nsdecls': nsdecls('a', 'p'),
            'id':      id_,
            'name':    name,
            'x':       x,
            'y':       y,
            'cx':      cx,
            'cy':      cy,
            'prst':    prst,
            'flip':    flip,
        })
        return parse_xml(xml)
149788
public LeafNode createNode() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        PubSub reply = sendPubsubPacket(Type.set, new NodeExtension(PubSubElementType.CREATE), null);
        NodeExtension elem = reply.getExtension("create", PubSubNamespace.basic.getXmlns());

        LeafNode newNode = new LeafNode(this, elem.getNode());
        nodeMap.put(newNode.getId(), newNode);

        return newNode;
    }
1136683
def xpath(self, xpath_str):
        
        return super(BaseOxmlElement, self).xpath(
            xpath_str, namespaces=nsmap
        )
678447
public static NodeImpl createBeanNode(final NodeImpl parent) {
    return new NodeImpl( //
        null, //
        parent, //
        false, //
        null, //
        null, //
        ElementKind.BEAN, EMPTY_CLASS_ARRAY, //
        null, //
        null, //
        null, //
        null //
    );
  }
1038687
def add_children(self, root):
        
        for c in root.getChildren(ns=wsdlns):
            child = Factory.create(c, self)
            if child is None:
                continue
            self.children.append(child)
            if isinstance(child, Import):
                self.imports.append(child)
                continue
            if isinstance(child, Types):
                self.types.append(child)
                continue
            if isinstance(child, Message):
                self.messages[child.qname] = child
                continue
            if isinstance(child, PortType):
                self.port_types[child.qname] = child
                continue
            if isinstance(child, Binding):
                self.bindings[child.qname] = child
                continue
            if isinstance(child, Service):
                self.services.append(child)
                continue
195733
def newReference(self, name):
        
        ret = libxml2mod.xmlNewReference(self._o, name)
        if ret is None:raise treeError('xmlNewReference() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
1169117
private static Node brokerToNode(Broker broker) {
		return new Node(broker.id(), broker.host(), broker.port());
	}
585750
def cb(self, elt, sw, pyobj, unsuppressedPrefixes=[]):
        
        #if sw.Known(pyobj): 
        #    return

        if type(pyobj) in _stringtypes:
            elt.createAppendTextNode(pyobj)
            return

        ## grab document and import node, and append it
        doc = elt.getDocument()
        node = doc.importNode(pyobj, deep=1)
        child = elt.node.appendChild(node)

        ## copy xmlns: attributes into appended node
        parent = pyobj.parentNode
        while parent.nodeType == _Node.ELEMENT_NODE:
            for attr in filter(lambda a: a.name.startswith('xmlns:') and a.name not in child.attributes.keys(), parent.attributes): 
                child.setAttributeNode(attr.cloneNode(1))

            parent = parent.parentNode
323804
def populate_tree(self, master, parent, element,from_file=False):
        """"""

        data = WidgetDescr(None, None)
        data.from_xml_node(element)
        cname = data.get_class()
        uniqueid = self.get_unique_id(cname, data.get_id())
        data.set_property('id', uniqueid)

        if cname in builder.CLASS_MAP:
            pwidget = self._insert_item(master, data,from_file=from_file)
            xpath = "./child"
            children = element.findall(xpath)
            for child in children:
                child_object = child.find('./object')
                cwidget = self.populate_tree(pwidget, child, child_object,from_file=from_file)

            return pwidget
        else:
            raise Exception('Class "{0}" not mapped'.format(cname))
1083259
def root(self):
        
        self.xml_root = ElementTree.Element('interface')
        self.xml_root.set('type', self.type)
        if self.mac is not None:
            mac = ElementTree.SubElement(self.xml_root, 'mac')
            mac.set('address', self.mac)
        _source = ElementTree.SubElement(self.xml_root, 'source')
        _source.set(self.type, self.source)
        _model = ElementTree.SubElement(self.xml_root, 'model')
        _model.set('type', self.model)
        return self.xml_root
1333787
def xpath(self, xpath_str):
        
        return super(BaseOxmlElement, self).xpath(
            xpath_str, namespaces=_nsmap
        )
672100
def create_untl_xml_subelement(parent, element, prefix=''):
    """"""
    subelement = SubElement(parent, prefix + element.tag)
    if element.content is not None:
        subelement.text = element.content
    if element.qualifier is not None:
        subelement.attrib["qualifier"] = element.qualifier
    if element.children > 0:
        for child in element.children:
            SubElement(subelement, prefix + child.tag).text = child.content
    else:
        subelement.text = element.content

    return subelement
455526
def newNsProp(self, node, name, value):
        
        if node is None: node__o = None
        else: node__o = node._o
        ret = libxml2mod.xmlNewNsProp(node__o, self._o, name, value)
        if ret is None:raise treeError('xmlNewNsProp() failed')
        __tmp = xmlAttr(_obj=ret)
        return __tmp
867325
def tree_to_xml(self):
        """"""

        # Need to remove filter or hidden items will not be saved.
        self.filter_remove(remember=True)

        tree = self.treeview
        root = ET.Element('interface')
        items = tree.get_children()
        for item in items:
            node = self.tree_node_to_xml('', item)
            root.append(node)

        # restore filter
        self.filter_restore()

        return ET.ElementTree(root)
47521
def from_elements(cls, elts=None):
        
        node = cls()
        if elts is None:
            node.elts = []
        else:
            node.elts = [const_factory(e) if _is_const(e) else e for e in elts]
        return node
1098819
def newCharRef(self, name):
        
        ret = libxml2mod.xmlNewCharRef(self._o, name)
        if ret is None:raise treeError('xmlNewCharRef() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
41633
private static LblTree createTree(TreeWalker walker) {
		Node parent = walker.getCurrentNode();
		LblTree node = new LblTree(parent.getNodeName(), -1); // treeID = -1
		for (Node n = walker.firstChild(); n != null; n = walker.nextSibling()) {
			node.add(createTree(walker));
		}
		walker.setCurrentNode(parent);
		return node;
	}