Processes the XML document at the provided {@link URL} and returns a result from the namespace element handlers.
160855
public <T> T processDocument(URI uri) throws ConfigurationException
    {
        DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
        dbFactory.setNamespaceAware(true);
        DocumentBuilder dBuilder = null;

        try
        {
            dBuilder = dbFactory.newDocumentBuilder();
        }
        catch (Exception e)
        {
            throw new WindupException("Failed to build xml parser due to: " + e.getMessage(), e);
        }

        try
        {
            Document doc = dBuilder.parse(uri.toString());
            return processElement(doc.getDocumentElement());
        }
        catch (Exception e)
        {
            throw new WindupException("Failed to parse document at: " + uri + ", due to: " + e.getMessage(), e);
        }

    }
1253709
@Override
    public void processXML() throws InjectionException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "processXML : " + ivNameSpaceConfig.getPersistenceContextRefs());

        // d416151.3 Begins
        List<? extends PersistenceContextRef> pCtxtRefs = ivNameSpaceConfig.getPersistenceContextRefs();
        if (pCtxtRefs != null && pCtxtRefs.size() > 0)
        {
            for (PersistenceContextRef pCtxtRef : pCtxtRefs)
            {
                if (isTraceOn && tc.isDebugEnabled())
                    Tr.debug(tc, " pCtxtRef = " + pCtxtRef);

                // If XML has previously been read and an injection binding with the same
                // jndi name has been created, get the current injection binding and merge
                // the new PersistenceContext Ref into it.
                String jndiName = pCtxtRef.getName();
                InjectionBinding<PersistenceContext> injectionBinding = ivAllAnnotationsCollection.get(jndiName);
                if (injectionBinding != null)
                {
                    ((JPAPCtxtInjectionBinding) injectionBinding).merge(pCtxtRef);
                }
                else
                {
                    injectionBinding = new JPAPCtxtInjectionBinding(pCtxtRef, ivNameSpaceConfig, ivAttributeAccessor); // d662814
                    addInjectionBinding(injectionBinding);
                }

                ((AbstractJPAInjectionBinding<?>) injectionBinding).addRefComponents(jndiName); // F743-30682

                // Process any injection-targets that may be specified.    d429866.1
                // The code takes into account the possibility of duplicate InjectionTargets
                // and will only add if not already present, regardless of whether this is
                // a newly created binding, or a second one being merged.
                List<InjectionTarget> targets = pCtxtRef.getInjectionTargets();
                if (targets != null && !targets.isEmpty())
                {
                    for (InjectionTarget target : targets)
                    {
                        String injectionClassName = target.getInjectionTargetClassName();
                        String injectionName = target.getInjectionTargetName();
                        injectionBinding.addInjectionTarget(EntityManager.class,
                                                            injectionName,
                                                            injectionClassName);
                    }
                }
            }
        }
        // d416151.3 Ends
        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "processXML : " + ivAllAnnotationsCollection.size());
    }
1016370
function XmlDocument(xml) {
  xml && (xml = xml.toString().trim());

  if (!xml)
    throw new Error("No XML to parse!");

  // Expose the parser to the other delegates while the parser is running
  this.parser = sax.parser(true); // strict
  addParserEvents(this.parser);

  // We'll use the file-scoped "delegates" var to remember what elements we're currently
  // parsing; they will push and pop off the stack as we get deeper into the XML hierarchy.
  // It's safe to use a global because JS is single-threaded.
  delegates = [this];
  
  this.parser.write(xml);

  // Remove the parser as it is no longer needed and should not be exposed to clients
  delete this.parser;
}
1171160
function (url) {
    var req = new XMLHttpRequest();

    // Response handler. Check the console for errors.
    var respond = function () {
        if (req.status !== 200) {
          console.warn(req.responseText);
          return;
        }
        // Show the raw response text on page
        xmlOutput.textContent = req.responseText;
        // convert XML to javascript objects
        var json = sdmxmllib.mapSDMXMLResponse(req.responseText);
        // Convert to json and show on page
        jsonOutput.textContent = JSON.stringify(json, null, 2);
    };

    req.open('GET', url);
    // This will return latest version (SDMX-ML 2.1)
    req.setRequestHeader('Accept', 'application/xml');

    req.onreadystatechange = function () {
      if (req.readyState > 3) respond();
    };

    req.onerror = function (err) {
      console.warn(err);
    };

    req.send(null);
  }
1034767
function(url){
                ajaGo._xhr.call(this, url, function processRes(res){
                    if(data.into && data.into.length){
                        [].forEach.call(data.into, function(elt){
                            elt.innerHTML = res;
                        });
                    }
                    return res;
                });
            }
828724
function processUrl(result, decl, node, opts) {
    // ignore from the css file by `!`
    if (node.value.indexOf('!') === 0) {
        node.value = node.value.slice(1);
        return Promise.resolve();
    }

    if (
        node.value.indexOf('/') === 0 ||
        node.value.indexOf('data:') === 0 ||
        node.value.indexOf('#') === 0 ||
        /^[a-z]+:\/\//.test(node.value)
    ) {
        return Promise.resolve();
    }

    /**
     * dirname of the read file css
     * @type {String}
     */
    const dirname = path.dirname(decl.source.input.file);

    let fileMeta = getFileMeta(
        dirname,
        decl.source.input.file,
        node.value,
        opts
    );

    // ignore from the fileMeta config
    if (ignore(fileMeta, opts)) {
        return Promise.resolve();
    }

    return copy(
        fileMeta.absolutePath,
        () => fileMeta.resultAbsolutePath,
        (contents, isModified) => {
            fileMeta.contents = contents;

            return Promise.resolve(
                isModified ? opts.transform(fileMeta) : fileMeta
            )
                .then(fileMetaTransformed => {
                    fileMetaTransformed.hash = opts.hashFunction(
                        fileMetaTransformed.contents
                    );
                    let tpl = opts.template;
                    if (typeof tpl === 'function') {
                        tpl = tpl(fileMetaTransformed);
                    } else {
                        tags.forEach(tag => {
                            tpl = tpl.replace(
                                '[' + tag + ']',
                                fileMetaTransformed[tag] || opts[tag] || ''
                            );
                        });
                    }

                    const resultUrl = url.parse(tpl);
                    fileMetaTransformed.resultAbsolutePath = decodeURI(
                        path.resolve(
                            opts.dest,
                            resultUrl.pathname
                        )
                    );
                    fileMetaTransformed.extra = (resultUrl.search || '') +
                        (resultUrl.hash || '');

                    return fileMetaTransformed;
                })
                .then(fileMetaTransformed => fileMetaTransformed.contents);
        }
    ).then(() => {
        const destPath = defineCSSDestPath(
            dirname,
            fileMeta.basePath,
            result,
            opts
        );

        node.value = path
            .relative(destPath, fileMeta.resultAbsolutePath)
            .split('\\')
            .join('/') + fileMeta.extra;
    });
}
316815
public XmlHttpResponse doHttpGetXml(String url) {
        XmlHttpResponse response = new XmlHttpResponse();
        doGet(url, response);
        setContext(response);
        return response;
    }
131403
function processURLSegments(parentNode, segments) {
		segments.forEach(function(segment) {
			if (segment.urlStr){
				var link = document.createElement("a"); //$NON-NLS-0$
		        link.href = segment.urlStr;
		        link.appendChild(document.createTextNode(segment.segmentStr));
		        link.dir = bidiUtils.getTextDirection(segment.segmentStr);
				parentNode.appendChild(link);
			} else {
				var plainText = document.createElement("span"); //$NON-NLS-0$
				plainText.textContent = segment.segmentStr;
				plainText.dir = bidiUtils.getTextDirection(segment.segmentStr);
				parentNode.appendChild(plainText);
			}
		});
	}
1027831
@Override
    public void processXML()
                    throws InjectionException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "processXML : " + this);

        List<? extends MailSession> mailSessionDefinitions = ivNameSpaceConfig.getJNDIEnvironmentRefs(MailSession.class);

        if (mailSessionDefinitions != null)
        {
            for (MailSession mailSession : mailSessionDefinitions)
            {
                String jndiName = mailSession.getName();
                InjectionBinding<MailSessionDefinition> injectionBinding = ivAllAnnotationsCollection.get(jndiName);
                MailSessionDefinitionInjectionBinding binding;

                if (injectionBinding != null)
                {
                    binding = (MailSessionDefinitionInjectionBinding) injectionBinding;
                }
                else
                {
                    binding = new MailSessionDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
                    addInjectionBinding(binding);
                }

                binding.mergeXML(mailSession);
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "processXML : " + this);

    }
933554
public static <T> T executeXmlResult(HttpUriRequest request,Class<T> clazz){
		return execute(request,XmlResponseHandler.createResponseHandler(clazz));
	}
1056265
def parse_owl_xml(url):
    
    res = download(url)
    owl = OWLParser(content=res.content)
    return owl
70862
public Document parse(String url) throws SAXException, IOException
    {
        return verify(_WrappedBuilder.parse(url));
    }
472432
@Override
    public void processXML() throws InjectionException {

        List<? extends JMSConnectionFactory> jmsConnectionFactoryDefinitions = ivNameSpaceConfig.getJNDIEnvironmentRefs(JMSConnectionFactory.class);

        if (jmsConnectionFactoryDefinitions != null) {
            for (JMSConnectionFactory jmsConnectionFactory : jmsConnectionFactoryDefinitions) {
                String jndiName = jmsConnectionFactory.getName();
                InjectionBinding<JMSConnectionFactoryDefinition> injectionBinding = ivAllAnnotationsCollection.get(jndiName);
                JMSConnectionFactoryDefinitionInjectionBinding binding;

                if (injectionBinding != null) {
                    binding = (JMSConnectionFactoryDefinitionInjectionBinding) injectionBinding;
                } else {
                    binding = new JMSConnectionFactoryDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
                    addInjectionBinding(binding);
                }

                binding.mergeXML(jmsConnectionFactory);
            }
        }

    }
642628
@Override
    public int doEndTag() throws JspException {
        // produce a Document by parsing whatever the attributes tell us to use
        Object xmlText = this.xml;
        if (xmlText == null) {
            // if the attribute was specified, use the body as 'xml'
            if (bodyContent != null && bodyContent.getString() != null) {
                xmlText = bodyContent.getString().trim();
            } else {
                xmlText = "";
            }
        }
        if (xmlText instanceof String) {
            xmlText = new StringReader((String) xmlText);
        }
        if (!(xmlText instanceof Reader)) {
            throw new JspTagException(Resources.getMessage("PARSE_INVALID_SOURCE"));
        }
        InputSource source = XmlUtil.newInputSource(((Reader) xmlText), systemId);

        Document d;
        if (filter != null) {
            d = parseInputSourceWithFilter(source, filter);
        } else {
            d = parseInputSource(source);
        }

        // we've got a Document object; store it out as appropriate
        // (let any exclusivity or other constraints be enforced by TEI/TLV)
        if (var != null) {
            pageContext.setAttribute(var, d, scope);
        }
        if (varDom != null) {
            pageContext.setAttribute(varDom, d, scopeDom);
        }

        return EVAL_PAGE;
    }
1223158
@Override
    public void processXML() throws InjectionException {

        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "processXML : " + this);

        List<? extends ConnectionFactory> connectionFactoryDefinitions = ivNameSpaceConfig.getJNDIEnvironmentRefs(ConnectionFactory.class);

        if (connectionFactoryDefinitions != null)
        {
            for (ConnectionFactory connectionFactory : connectionFactoryDefinitions)
            {
                String jndiName = connectionFactory.getName();
                InjectionBinding<ConnectionFactoryDefinition> injectionBinding = ivAllAnnotationsCollection.get(jndiName);
                ConnectionFactoryDefinitionInjectionBinding binding;

                if (injectionBinding != null)
                {
                    binding = (ConnectionFactoryDefinitionInjectionBinding) injectionBinding;
                }
                else
                {
                    binding = new ConnectionFactoryDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
                    addInjectionBinding(binding);
                }

                binding.mergeXML(connectionFactory);
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "processXML : " + this);

    }
1239459
private String filterXML(HttpServletRequest request,
                             DataResponseWrapper response)
            throws ServletException {
        String body = new String(response.getData());
        DocumentBuilder docBuilder = null;
        Document doc = null;

        try {
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setNamespaceAware(true);
            docBuilder =
                    docBuilderFactory.newDocumentBuilder();
            doc =
                    docBuilder.parse(new ByteArrayInputStream(response
                            .getData()));
        } catch (Exception e) {
            throw new ServletException(e);
        }

        XPath xpath = XPathFactory.newInstance().newXPath();

        String pid = null;
        NodeList datastreams = null;
        try {
            pid = xpath.evaluate("/objectDatastreams/@pid", doc);
            if (logger.isDebugEnabled()) {
                logger.debug("filterXML: pid = [" + pid + "]");
            }

            datastreams =
                    (NodeList) xpath.evaluate("/objectDatastreams/datastream",
                                              doc,
                                              XPathConstants.NODESET);
        } catch (XPathExpressionException xpe) {
            throw new ServletException("Error parsing HTML for search results: ",
                                       xpe);
        }

        if (datastreams.getLength() == 0) {
            if (logger.isDebugEnabled()) {
                logger.debug("No results to filter.");
            }

            return body;
        }

        Map<String, Node> dsids = new HashMap<String, Node>();
        for (int x = 0; x < datastreams.getLength(); x++) {
            String dsid =
                    datastreams.item(x).getAttributes().getNamedItem("dsid")
                            .getNodeValue();
            dsids.put(dsid, datastreams.item(x));
        }

        Set<Result> results =
                evaluatePids(dsids.keySet(), pid, request, response);

        for (Result r : results) {
            String resource = r.getResource();
            if (resource == null || resource.isEmpty()) {
                logger.warn("This resource has no resource identifier in the xacml response results!");
            } else if (logger.isDebugEnabled()) {
                logger.debug("Checking: " + r.getResource());
            }

            int lastSlash = resource.lastIndexOf('/');
            String rid = resource.substring(lastSlash + 1);

            if (r.getStatus().getCode().contains(Status.STATUS_OK)
                    && r.getDecision() != Result.DECISION_PERMIT) {
                Node node = dsids.get(rid);
                node.getParentNode().removeChild(node);
                if (logger.isDebugEnabled()) {
                    logger.debug("Removing: " + resource + "[" + rid + "]");
                }
            }
        }

        Source src = new DOMSource(doc);
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        javax.xml.transform.Result dst = new StreamResult(os);
        try {
            xFormer.transform(src, dst);
        } catch (TransformerException te) {
            throw new ServletException("error generating output", te);
        }

        return new String(os.toByteArray());
    }
737628
@Override
    public void processXML() throws InjectionException {

        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "processXML : " + this);

        List<? extends AdministeredObject> administeredObjectDefinitions = ivNameSpaceConfig.getJNDIEnvironmentRefs(AdministeredObject.class);

        if (administeredObjectDefinitions != null)
        {
            for (AdministeredObject administeredObject : administeredObjectDefinitions)
            {
                String jndiName = administeredObject.getName();
                InjectionBinding<AdministeredObjectDefinition> injectionBinding = ivAllAnnotationsCollection.get(jndiName);
                AdministeredObjectDefinitionInjectionBinding binding;

                if (injectionBinding != null)
                {
                    binding = (AdministeredObjectDefinitionInjectionBinding) injectionBinding;
                }
                else
                {
                    binding = new AdministeredObjectDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
                    addInjectionBinding(binding);
                }

                binding.mergeXML(administeredObject);
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "processXML : " + this);

    }