コード例 #1
0
ファイル: XMLUtil.java プロジェクト: ilyessou/jhotdraw
  /**
   * 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);
  }
コード例 #2
0
ファイル: XMLUtil.java プロジェクト: ilyessou/jhotdraw
  /**
   * 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);
  }