Parse LOCALINSTANCEPATH element returning instancename
           <!ELEMENT LOCALINSTANCEPATH (LOCALNAMESPACEPATH, INSTANCENAME)>
329033
def parse_localinstancepath(parser, event, node):
    

    #pylint: disable=unused-argument

    (next_event, next_node) = six.next(parser)

    if not _is_start(next_event, next_node, 'LOCALNAMESPACEPATH'):
        raise ParseError('Expecting LOCALNAMESPACEPATH')

    namespacepath = parse_localnamespacepath(parser, next_event, next_node)

    (next_event, next_node) = six.next(parser)

    if not _is_start(next_event, next_node, 'INSTANCENAME'):
        raise ParseError('Expecting INSTANCENAME')

    instancename = parse_instancename(parser, next_event, next_node)

    instancename.namespace = namespacepath

    return instancename
313856
def instance_names namespace, classname=nil, properties = {}
    case namespace
    when Openwsman::ObjectPath
      classname = namespace.classname
      properties = namespace.properties
      namespace = namespace.namespace
      uri = epr_uri_for(namespace,classname)
    when Openwsman::EndPointReference
      namespace.each do |k,v|
        properties[k] = v
      end
      classname = namespace.classname
      uri = namespace.resource_uri
      namespace = namespace.namespace
    else
      uri = epr_uri_for(namespace, classname)
    end
    @options.flags = Openwsman::FLAG_ENUMERATION_ENUM_EPR | Openwsman::FLAG_ENUMERATION_OPTIMIZATION
    @options.max_elements = 999
    @options.cim_namespace = namespace if @product == :openwsman
    @options.set_dump_request if Wbem.debug
    @options.selectors = properties unless properties.empty?
    start = Time.now
    STDERR.puts "instance_names enumerate (#{uri})" if Wbem.debug
    result = @client.enumerate( @options, nil, uri )
    names = []
    loop do
      if _handle_fault @client, result
        break
      end
      items = result.Items
      if items
        # expect <n:Item><a:EndpointReference>...
        items.each do |epr|
          names << Openwsman::EndPointReference.new(epr)
        end
      end
      context = result.context
      break unless context
      result = @client.pull( @options, nil, uri, context )
    end
    STDERR.puts "Enumerated #{names.size} items in #{Time.now-start} seconds" if Wbem.debug
    return names
  end
463442
def parse_namespacepath(parser, event, node): #pylint: disable=unused-argument
    


    (next_event, next_node) = six.next(parser)

    if not _is_start(next_event, next_node, 'HOST'):
        raise ParseError('Expecting HOST')

    host = parse_host(parser, next_event, next_node)

    (next_event, next_node) = six.next(parser)

    if not _is_start(next_event, next_node, 'LOCALNAMESPACEPATH'):
        raise ParseError('Expecting LOCALNAMESPACEPATH')

    namespacepath = parse_localnamespacepath(parser, next_event, next_node)

    (next_event, next_node) = six.next(parser)

    if not _is_end(next_event, next_node, 'NAMESPACEPATH'):
        raise ParseError('Expecting end NAMESPACEPATH')

    return (host, namespacepath)
596608
def parse_methodcall(self, tup_tree):
        

        self.check_node(tup_tree, 'METHODCALL', ('NAME',), (),
                        ('LOCALCLASSPATH', 'LOCALINSTANCEPATH', 'PARAMVALUE'))

        path = self.list_of_matching(tup_tree,
                                     ('LOCALCLASSPATH', 'LOCALINSTANCEPATH'))
        if not path:
            raise CIMXMLParseError(
                _format("Element {0!A} missing a required child element "
                        "'LOCALCLASSPATH' or 'LOCALINSTANCEPATH'",
                        name(tup_tree)),
                conn_id=self.conn_id)
        if len(path) > 1:
            raise CIMXMLParseError(
                _format("Element {0!A} has too many child elements {1!A} "
                        "(allowed is one of 'LOCALCLASSPATH' or "
                        "'LOCALINSTANCEPATH')", name(tup_tree), path),
                conn_id=self.conn_id)
        path = path[0]
        params = self.list_of_matching(tup_tree, ('PARAMVALUE',))
        return (name(tup_tree), attrs(tup_tree), path, params)
489463
def parse_instance_requirement(self, node):
        

        if 'name' in node.lattrib:
            name = node.lattrib['name']
        else:
            self.raise_error('<InstanceRequirement> must specify a name')

        if 'type' in node.lattrib:
            type = node.lattrib['type']
        else:
            self.raise_error("InstanceRequirement \{0}' must specify a type.", name)

        self.current_component_type.add_instance_requirement(InstanceRequirement(name, type))
432832
private void parseInstanceOfExpr() throws TTXPathException {

        parseTreatExpr();

        if (is("instance", true)) {
            consume("of", true);

            mPipeBuilder.addInstanceOfExpr(getTransaction(), parseSequenceType());
        }
    }
163855
public String extractInstance(XEvent event) {
		XAttribute attribute = event.getAttributes().get(KEY_INSTANCE);
		if (attribute == null) {
			return null;
		} else {
			return ((XAttributeLiteral) attribute).getValue();
		}
	}
894879
public static String getInstanceName(String instanceName, Config config) {
        String name = instanceName;

        if (name == null || name.trim().length() == 0) {
            name = createInstanceName(config);
        }

        return name;
    }
448218
function getInstancesOf(_typeName) {
        var _instances = [],
            _typeNames = [];

        if (_.isArray(_typeName)) {
            _typeNames = _typeName;
        } else if (_.isString(_typeName)) {
            _typeNames.push(_typeName);
        }

        _.each(_idMap, function (elem) {
            var i, len, _typeTest = false;

            for (i = 0, len = _typeNames.length; i < len; i++) {
                if (elem instanceof _global.type[_typeNames[i]]) {
                    _typeTest = true;
                    break;
                }
            }

            if (_typeTest) {
                _instances.push(elem);
            }
        });

        return _instances;
    }
471326
def readKerningElement(self, kerningElement, instanceObject):
        
        kerningLocation = self.locationFromElement(kerningElement)
        instanceObject.addKerning(kerningLocation)
396079
def parse_child_instance(self, node):
        

        if 'component' in node.lattrib:
            component = node.lattrib['component']
        else:
            self.raise_error('<ChildInstance> must specify a component reference')

        self.current_structure.add_child_instance(ChildInstance(component))
216868
private int parseObject() throws Exception {
        int elementsWritten = 0;
        while (jsonParser.nextToken() != null && jsonParser.getCurrentToken() != END_OBJECT) {
            if (FIELD_NAME.equals(jsonParser.getCurrentToken())) {
                String elementName = convertName(jsonParser.getCurrentName());
                //jump to element value
                jsonParser.nextToken();
                startElement(elementName);
                parseElement(elementName, false);
                endElement(elementName);
                elementsWritten++;
            } else {
                throw new ParserException("Error when parsing. Expected field name got " + jsonParser.getCurrentToken());
            }
        }
        return elementsWritten;
    }
330002
static final String attr(Element element, String name, boolean ignoreNamespace) {
        NamedNodeMap attributes = element.getAttributes();

        for (int i = 0; i < attributes.getLength(); i++) {
            String localName = attributes.item(i).getNodeName();

            // [#103] If namespaces are ignored, consider only local
            // part of possibly namespace-unaware Element
            if (ignoreNamespace)
                localName = stripNamespace(localName);

            if (name.equals(localName))
                return attributes.item(i).getNodeValue();
        }

        return null;
    }
124914
public String getInstancesNodeFullPath(final String instanceId) {
        return Joiner.on("/").join("", name, ROOT, INSTANCES_NODE_PATH, instanceId);
    }
1243641
@Override
    public boolean containsInstance(int value, T instance) {
    	if (root == null) return false;
    	if (value < first.value) return false;
    	if (value > last.value) return false;
    	if (value == first.value && instance == first.element) return true;
    	if (value == last.value && instance == last.element) return true;
    	return containsInstance(root, value, instance);
    }
1048676
function parse(node) {
    const cfg = Object.assign({}, copyXmlAttributes(node));

    for (let i = 0, l = node.childNodes.length; i < l; ++i) {
        const el = node.childNodes.item(i);
        if (el.nodeType === ELEMENT_NODE) {
            if (!el.namespaceURI) {
                // attribute elements
                if (!cfg.attributes) cfg.attributes = {};
                cfg.attributes[el.localName] = el.childNodes.length ? parse(el) : copyXmlAttributes(el);
            } else if (el.namespaceURI === 'urn:flora:options') {
                // flora specific elements
                if (el.localName === 'dataSource') {
                    const dataSource = getDataSource(el);
                    if (!cfg.dataSources) cfg.dataSources = {};
                    if (cfg.dataSources[dataSource.name]) {
                        throw new Error(`Data source "${dataSource.name}" already defined`);
                    }
                    cfg.dataSources[dataSource.name] = dataSource.config;
                }
                if (el.localName === 'subFilter') {
                    if (!cfg.subFilters) cfg.subFilters = [];
                    cfg.subFilters.push(copyXmlAttributes(el));
                }
            }
        } else if (el.nodeType === TEXT_NODE && el.textContent.trim().length > 0) {
            throw new ImplementationError(`Config contains unnecessary text: "${el.textContent.trim()}"`);
        }
    }

    return cfg;
}
125498
def _find_attrNS(E, namespaceURI, localName):
    '''
    '''
    try:
        v = E.getAttributeNS(namespaceURI, localName)
        if v: return v
    except: pass
    return None