Method for importing 'childLaneSet' element from diagram file.

        :param child_lane_set_element: XML document element,
        :param plane_element: object representing a BPMN XML 'plane' element.
351955
def import_child_lane_set_element(child_lane_set_element, plane_element):
        
        lane_set_id = child_lane_set_element.getAttribute(consts.Consts.id)
        lanes_attr = {}
        for element in utils.BpmnImportUtils.iterate_elements(child_lane_set_element):
            if element.nodeType != element.TEXT_NODE:
                tag_name = utils.BpmnImportUtils.remove_namespace_from_tag_name(element.tagName)
                if tag_name == consts.Consts.lane:
                    lane = element
                    lane_id = lane.getAttribute(consts.Consts.id)
                    lane_attr = BpmnDiagramGraphImport.import_lane_element(lane, plane_element)
                    lanes_attr[lane_id] = lane_attr

        child_lane_set_attr = {consts.Consts.id: lane_set_id, consts.Consts.lanes: lanes_attr}
        return child_lane_set_attr
287590
def child_elements(self, by=By.ID, value=None, el_class=None):
        
        el, selector = define_selector(by, value, el_class)
        return self._init_element(elements.PageElementsList(selector, el))
167437
def add_block_as_child_node(self, block, node):
        
        child = etree.SubElement(node, "unknown")
        block.add_xml_to_node(child)
1213914
def _child_list(element, child_tagname):
    
    xpath = './%s' % child_tagname
    return element.xpath(xpath, namespaces=nsmap)
1140991
public static Element createPlfNodeAndPath(
            Element compViewNode, boolean includeChildNodes, IPerson person)
            throws PortalException {
        // first attempt to get parent
        Element compViewParent = (Element) compViewNode.getParentNode();
        Element plfParent = getPLFNode(compViewParent, person, true, false);
        Document plf = (Document) person.getAttribute(Constants.PLF);

        // if ilf copy being created we can append to parent and use the
        // position set to place it.

        if (compViewNode
                .getAttribute(Constants.ATT_ID)
                .startsWith(Constants.FRAGMENT_ID_USER_PREFIX))
            return createILFCopy(
                    compViewNode, compViewParent, includeChildNodes, plf, plfParent, person);
        return createOrMovePLFOwnedNode(
                compViewNode,
                compViewParent,
                true, // create if not found
                includeChildNodes,
                plf,
                plfParent,
                person);
    }
334763
def get_element_attributes(parent_to_parse, element_path=None):
    

    element = get_element(parent_to_parse, element_path)

    return {} if element is None else element.attrib
1318099
def add(self, child):
        

        if isinstance(child, Run):
            self.add_run(child)
        elif isinstance(child, Record):
            self.add_record(child)
        elif isinstance(child, EventRecord):
            self.add_event_record(child)
        elif isinstance(child, DataDisplay):
            self.add_data_display(child)
        elif isinstance(child, DataWriter):
            self.add_data_writer(child)
        elif isinstance(child, EventWriter):
            self.add_event_writer(child)
        else:
            raise ModelError('Unsupported child element')
1054148
def ImportBoarding(self, drop_off_file):
    ""
    for trip_id, seq, code in \
    ReadCSV(drop_off_file, ['FRT_FID', 'LI_LFD_NR', 'BEDVERB_CODE']):
      key = (trip_id, int(seq) - 1)
      if code == 'A':
        self.pickup_type[key] = '1'  # '1' = no pick-up
      elif code == 'E':
        self.drop_off_type[key] = '1'  # '1' = no drop-off
      elif code == 'B' :
        # 'B' just means that rider needs to push a button to have the driver
        # stop. We don't encode this for now.
        pass
      else:
        raise ValueError('Unexpected code in bedverb.mdv; '
                         'FRT_FID=%s BEDVERB_CODE=%s' % (trip_id, code))
1290615
def children(self) -> NodeList:
        
        return NodeList([e for e in self.childNodes
                         if e.nodeType == Node.ELEMENT_NODE])
91115
def element_map(
        self,
        tags=None,
        xpath="//*",
        exclude_attribs=[],
        include_attribs=[],
        attrib_vals=False,
        hierarchy=False,
        minimize=False,
    ):
        
        if tags is None:
            tags = Dict()
        for elem in self.root.xpath(xpath):
            if elem.tag not in tags.keys():
                tags[elem.tag] = Dict(**{'parents': [], 'children': [], 'attributes': Dict()})
            for a in [
                a
                for a in elem.attrib.keys()
                if (include_attribs == [] and a not in exclude_attribs) or (a in include_attribs)
            ]:
                # Attribute Names
                if a not in tags[elem.tag].attributes.keys():
                    tags[elem.tag].attributes[a] = []
                # Attribute Values
                if attrib_vals == True and elem.get(a) not in tags[elem.tag].attributes[a]:
                    tags[elem.tag].attributes[a].append(elem.get(a))
            # Hierarchy: Parents and Children
            if hierarchy == True:
                parent = elem.getparent()
                if parent is not None and parent.tag not in tags[elem.tag].parents:
                    tags[elem.tag].parents.append(parent.tag)
                for child in elem.xpath("*"):
                    if child.tag not in tags[elem.tag].children:
                        tags[elem.tag].children.append(child.tag)
        if minimize == True:
            for tag in tags.keys():
                if tags[tag].get('parents') == []:
                    tags[tag].pop('parents')
                if tags[tag].get('children') == []:
                    tags[tag].pop('children')
                if tags[tag].get('attributes') == {}:
                    tags[tag].pop('attributes')
                if tags[tag] == {}:
                    tags.pop(tag)
        return tags
742440
public void addChildElement(Node element) {
        element.setParent(this);
        emptyElementTag = false; // can't be an empty element tag if you attach child elements
        childElements.add(element);
    }
461069
def set_element_text(parent_to_parse, element_path=None, element_text=u''):
    

    return _set_element_property(parent_to_parse, element_path, _ELEM_TEXT, element_text)
671412
def _add_cxnSp(self, connector_type, begin_x, begin_y, end_x, end_y):
        
        id_ = self._next_shape_id
        name = 'Connector %d' % (id_-1)

        flipH, flipV = begin_x > end_x, begin_y > end_y
        x, y = min(begin_x, end_x), min(begin_y, end_y)
        cx, cy = abs(end_x - begin_x), abs(end_y - begin_y)

        return self._element.add_cxnSp(
            id_, name, connector_type, x, y, cx, cy, flipH, flipV
        )
562295
def import_metadata(self, elements):
        
        metadata_elem = lambda name: etree.QName(GPX_NS, name)

        for child in elements.getchildren():
            tag_ns, tag_name = child.tag[1:].split('}')
            if not tag_ns == GPX_NS:
                continue
            if tag_name in ('name', 'desc', 'keywords'):
                setattr(self, tag_name, child.text)
            elif tag_name == 'time':
                self.time = utils.Timestamp.parse_isoformat(child.text)
            elif tag_name == 'author':
                self.author['name'] = child.findtext(metadata_elem('name'))
                aemail = child.find(metadata_elem('email'))
                if aemail:
                    self.author['email'] = '%s@%s' % (aemail.get('id'),
                                                      aemail.get('domain'))
                self.author['link'] = child.findtext(metadata_elem('link'))
            elif tag_name == 'bounds':
                self.bounds = {
                    'minlat': child.get('minlat'),
                    'maxlat': child.get('maxlat'),
                    'minlon': child.get('minlon'),
                    'maxlon': child.get('maxlon'),
                }
            elif tag_name == 'extensions':
                self.extensions = child.getchildren()
            elif tag_name == 'copyright':
                if child.get('author'):
                    self.copyright['name'] = child.get('author')
                self.copyright['year'] = child.findtext(metadata_elem('year'))
                self.copyright['license'] = child.findtext(metadata_elem('license'))
            elif tag_name == 'link':
                link = {
                    'href': child.get('href'),
                    'type': child.findtext(metadata_elem('type')),
                    'text': child.findtext(metadata_elem('text')),
                }
                self.link.append(link)
412157
private Element addElement(Document document, Element parent,
			Map<ReportKey, Object> reportsData, ReportKey key, String value) {
		if (reportsData.containsKey(key)) {
			Element child = document.createElement(key.name().toLowerCase());
			child.appendChild(document.createTextNode(value));
			parent.appendChild(child);
			return child;
		}
		return null;
	}
280383
def add(self, child):
        

        if isinstance(child, Assign):
            self.add_assign(child)
        else:
            raise ModelError('Unsupported child element')
921691
def update_xml_element(self):
        

        if not hasattr(self, 'xml_element'):
            self.xml_element = etree.Element(self.name, nsmap=NSMAP)

        self.xml_element.clear()
        self.xml_element.set('id', self.id)

        for child in self.children:
            child.update_xml_element()
            self.xml_element.append(child.xml_element)

        return self.xml_element