Examples of XMLParseException


Examples of org.freeplane.n3.nanoxml.XMLParseException

          }
          else if (ch == '!') {
            final char read1 = reader.read();
            final char read2 = reader.read();
            if (read1 != '-' || read2 != '-') {
              throw new XMLParseException(reader.getSystemID(), reader.getLineNr(), "Invalid input: <!"
                      + read1 + read2);
            }
            inComment = true;
            waitingBuf.append("<!--");
            continue;
          }
          else {
            level++;
          }
          waitingBuf.append('<');
        }
        else if (ch == '/') {
          ch = reader.read();
          if (ch == '>') {
            level--;
            if (level == 0) {
              throw new XMLParseException(reader.getSystemID(), reader.getLineNr(), "Invalid input: />");
            }
          }
          else if (ch == '<') {
            waitingBuf.append('/');
            reader.unread(ch);
View Full Code Here

Examples of org.freeplane.n3.nanoxml.XMLParseException

    if (nsPrefix != null) {
      fullName = nsPrefix + ':' + key;
    }
    final XMLElement top = stack.peek();
    if (top.hasAttribute(fullName)) {
      throw new XMLParseException(top.getSystemID(), top.getLineNr(), "Duplicate attribute: " + key);
    }
    if (nsPrefix != null) {
      top.setAttribute(fullName, nsURI, value);
    }
    else {
View Full Code Here

Examples of org.pentaho.platform.api.util.XmlParseException

    throws XmlParseException {
    Document document = null;
    try {
      document = XmlDom4JHelper.getDocFromStream( new ByteArrayInputStream( strXml.getBytes() ), resolver );
    } catch ( DocumentException e ) {
      throw new XmlParseException( Messages.getInstance().getErrorString(
          "XmlDom4JHelper.ERROR_0001_UNABLE_TO_GET_DOCUMENT_FROM_STRING" ), e ); //$NON-NLS-1$
    } catch ( IOException e ) {
      throw new XmlParseException( Messages.getInstance().getErrorString(
          "XmlDom4JHelper.ERROR_0002_UNSUPPORTED_ENCODING" ), e ); //$NON-NLS-1$
    }
    return document;
  }
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.