Examples of XMLRootHandler


Examples of org.eclipse.core.internal.content.XMLRootHandler

*/
@SuppressWarnings("restriction")
public final class SpringElementContentDescriber extends XMLContentDescriber {

  private int checkCriteria(InputSource contents) throws IOException {
    XMLRootHandler xmlHandler = new XMLRootHandler(true);
    try {
      if (!xmlHandler.parseContents(contents)) {
        return INDETERMINATE;
      }
    }
    catch (SAXException e) {
      // we may be handed any kind of contents... it is normal we fail to
      // parse
      return INDETERMINATE;
    }
    catch (ParserConfigurationException e) {
      // some bad thing happened - force this describer to be disabled
      String message = ContentMessages.content_parserConfiguration;
      RuntimeLog.log(new Status(IStatus.ERROR, ContentMessages.OWNER_NAME, 0, message, e));
      throw new RuntimeException(message);
    }

    // Check to see if we matched our criteria.
    String ns = xmlHandler.getRootNamespace();
    if (ns.startsWith(org.springframework.ide.eclipse.beans.core.namespaces.NamespaceUtils.DEFAULT_NAMESPACE_URI)) {
      return VALID;
    }

    if (ns != null) {
View Full Code Here

Examples of org.eclipse.jst.jee.util.internal.XMLRootHandler

 
  public FacesConfigQuickPeek(InputStream in) {
    if (in != null) {
      try {
        InputSource inputSource = new InputSource(in);
        handler = new XMLRootHandler();
        handler.parseContents(inputSource);
      } catch (Exception ex) {
        // ignore
      } finally {
        try {
View Full Code Here

Examples of org.eclipse.jst.jee.util.internal.XMLRootHandler

 
  public WebFragmentQuickPeek(InputStream in) {
    if (in != null) {
      try {
        InputSource inputSource = new InputSource(in);
        handler = new XMLRootHandler();
        handler.parseContents(inputSource);
      } catch (Exception ex) {
        // ignore
      } finally {
        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.