Esempio n. 1
0
    public static SgmlDtd Parse(Uri baseUri, string name, TextReader input, string subset, string proxy, XmlNameTable nt)
    {
      SgmlDtd dtd = new SgmlDtd(name, nt);
      dtd.PushEntity(baseUri, new Entity(dtd.Name, baseUri, input, proxy));
      if (!string.IsNullOrEmpty(subset))
      {
        dtd.PushEntity(baseUri, new Entity(name, subset));
      }

      try
      {
        dtd.Parse();
      }
      catch (Exception e)
      {
        throw new SgmlParseException(e.Message + dtd.m_current.Context());
      }

      return dtd;
    }