Package nanoxml

Examples of 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


    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

TOP

Related Classes of nanoxml.XMLParseException

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.