SetDeclaredContent() public method

Sets the contained content for the content model.
public SetDeclaredContent ( string dc ) : void
dc string The text specified the permissible declared child content.
return void
Example #1
0
 private ContentModel ParseContentModel(char ch)
 {
     ContentModel cm = new ContentModel();
     if (ch == '(') 
     {
         this.m_current.ReadChar();
         ParseModel(')', cm);
         ch = this.m_current.ReadChar();
         if (ch == '?' || ch == '+' || ch == '*') 
         {
             cm.AddOccurrence(ch);
             this.m_current.ReadChar();
         }
     } 
     else if (ch == '%') 
     {
         Entity e = ParseParameterEntity(SgmlDtd.dcterm);
         PushEntity(this.m_current.ResolvedUri, e);
         cm = ParseContentModel(this.m_current.Lastchar);
         PopEntity(); // bugbug should be at EOF.
     }
     else
     {
         string dc = ScanName(SgmlDtd.dcterm);
         cm.SetDeclaredContent(dc);
     }
     return cm;
 }