Exemplo n.º 1
0
  /**
   * Scans a system ID.
   *
   * @param reader the reader
   * @return the system ID
   * @throws java.io.IOException if an error occurred reading the data
   */
  static String scanSystemID(IXMLReader reader) throws IOException, XMLParseException {
    if (!XMLUtil.checkLiteral(reader, "YSTEM")) {
      return null;
    }

    XMLUtil.skipWhitespace(reader, null);
    return XMLUtil.scanString(reader, '\0', null);
  }
Exemplo n.º 2
0
  /**
   * Scans a public ID.
   *
   * @param publicID will contain the public ID
   * @param reader the reader
   * @return the system ID
   * @throws java.io.IOException if an error occurred reading the data
   */
  static String scanPublicID(StringBuffer publicID, IXMLReader reader)
      throws IOException, XMLParseException {
    if (!XMLUtil.checkLiteral(reader, "UBLIC")) {
      return null;
    }

    XMLUtil.skipWhitespace(reader, null);
    publicID.append(XMLUtil.scanString(reader, '\0', null));
    XMLUtil.skipWhitespace(reader, null);
    return XMLUtil.scanString(reader, '\0', null);
  }