示例#1
0
 private static void WriteElement(Element e, StreamWriter sr)
 {
     if(e==null) return;
     if(e.s!=null)
     {
         sr.Write(e.s);
         return;
     }
     WriteData(e.startTag,sr);
     for(int i=0;i<e.DataCount();i++)
     {
         WriteData(e.GetData(i),sr);
     }
     for(int i=0;i<e.ElementCount();i++)
         WriteElement(e.GetElement(i),sr);
     WriteData(e.endTag,sr);
 }
示例#2
0
 //**INTERNAL**METHODS
 internal int AddElement(Element e)
 {
     return this.elements.Add(e);
 }
示例#3
0
 internal void InsertElement(int index, Element e)
 {
     this.elements.Insert(index, e);
 }
示例#4
0
 internal int AddElement(Element e)
 {
     if(this.IsAccepted(e)) return this.elements.Add(e);
     else throw new UnexpectedElement();
 }
示例#5
0
 protected bool IsAccepted(Element e)
 {
     return true; // DEBUG : trebuie modificat
     //	return elementAcceptanceList.Contains(e);
 }
示例#6
0
 internal void InsertElement(int index, Element e)
 {
     if(this.IsAccepted(e))  this.elements.Insert(index,e);
     else throw new UnexpectedElement();
 }