Package nu.xom

Examples of nu.xom.XMLException


      }
    }
  }
 
  private static void throwTamperedWithParent() {
    throw new XMLException("Factory has tampered with a parent pointer " +
        "of ancestor-or-self in finishMakingElement()");
  }
View Full Code Here


  public Builder createW3CBuilder(Map schemaLocations) {
    XMLReader parser = createParser(true);
    try {
      setupW3CParser(parser, schemaLocations);     
    } catch (SAXException e) {
      throw new XMLException(
        "Can't find or create W3C schema validating parser (i.e. Xerces)" +
        " - check your classpath",
        e);
    }
   
View Full Code Here

      else {     
        setupFeaturesAndProps(parser);
      }
      if (DEBUG) System.err.println("using MSV XMLReader=" + parser.getClass().getName());
    } catch (SAXNotRecognizedException ex) { // e.g. syntax or semantic error in schema
      throw new XMLException(ex.toString(), ex);
    } catch (Exception ex) {
      throw new XMLException(
          "Could not find or create a suitable MSV parser" +
          " - check your classpath"
          , ex);
    } catch (NoClassDefFoundError ex) {
      throw new XMLException(
          "Could not find or create a suitable MSV parser" +
          " - check your classpath"
          , ex);
    }
   
View Full Code Here

      parser = factory.newSAXParser().getXMLReader();
      setupFeaturesAndProps(parser);
      if (DEBUG) System.err.println("using default JAXP XMLReader=" + parser.getClass().getName());
      return parser;
    } catch (Exception ex) {
      throw new XMLException(
          "Could not find or create a suitable SAX2 parser" +
          " - check your classpath",
          ex);
    } catch (NoClassDefFoundError ex) {
      throw new XMLException(
          "Could not find or create a suitable SAX2 parser" +
          " - check your classpath",
          ex);
    }
  }
View Full Code Here

                break;
            }
        }
       
        if (root == null) {
            throw new XMLException("No root element");
        }
       
        Document result = new Document(root);
       
        for (int i = 0; i < rootPosition; i++) {
View Full Code Here

    }

   
    public void skippedEntity(String name) {
        flushText();
        throw new XMLException("Could not resolve entity " + name);                        
    }
View Full Code Here

             } // end while
             statement.close();
             return new Document(table);
        }
        catch (SQLException ex) {  // convert exception type
            throw new XMLException("SQL error", ex);
        }
   
  }
View Full Code Here

       
        String doc = "<root/>";  
        Builder builder = new Builder(new NodeFactory() {
           
            public Nodes finishMakingElement(Element element) {
                throw new XMLException("Method was called");  
            }
           
        });
        try {
            builder.build(doc, "http://www.example.org/");
View Full Code Here

        super(name);
    }

   
    protected void setUp() {
        ex = new XMLException("message");
        cause = new Exception();
    }
View Full Code Here

        cause = new Exception();
    }

   
    public void testConstructor() {
        XMLException ex = new XMLException(message, cause);
        assertEquals(message, ex.getMessage());
        assertEquals(cause, ex.getCause());
    }
View Full Code Here

TOP

Related Classes of nu.xom.XMLException

Copyright © 2018 www.massapicom. 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.