Java XML Element Check isMuleNamespace(Element element)

Here you can find the source of isMuleNamespace(Element element)

Description

is Mule Namespace

License

Open Source License

Declaration

public static boolean isMuleNamespace(Element element) 

Method Source Code


//package com.java2s;
/*/*from   w w  w .  j a v a  2 s  .c om*/
 * $Id$
 * --------------------------------------------------------------------------------------
 * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 *
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */

import org.w3c.dom.Element;

public class Main {
    public static final String MULE_NAMESPACE_PREFIX = "http://www.mulesoft.org/schema/mule/";

    public static boolean isMuleNamespace(Element element) {
        String ns = element.getNamespaceURI();
        return ns != null && ns.startsWith(MULE_NAMESPACE_PREFIX);
    }
}

Related

  1. isHTMLElement(Element elem)
  2. isInfoNode(Element e)
  3. isLeaf(Element element)
  4. isLinkNode(Element e)
  5. isLocalName(Element element, String name)
  6. isNil(Element aElement)
  7. isNil(Element element)
  8. isSetPrefixBeforeStartElement( XMLStreamWriter writer)
  9. isSetPrefixBeforeStartElement(XMLStreamWriter writer)