public AttributeList LookForXMLClosingTag(AttributeList tag) { if (tag["/"] != null) { return(tag); } else { return(LookForTag("/" + tag.Name)); } }
/// <summary> /// Make an exact copy of this object using the cloneable /// interface. /// </summary> /// <returns>A new object that is a clone of the specified /// object.</returns> public override Object Clone() { AttributeList rtn = new AttributeList(); for (int i = 0; i < m_list.Count; i++) { rtn.Add((Attribute)this[i].Clone()); } return(rtn); }
public AttributeList GetTag() { AttributeList tag = new AttributeList(); tag.Name = m_tag; foreach (Attribute x in List) { tag.Add((Attribute)x.Clone()); } return(tag); }
public AttributeList LookFor2Tags(string tag1Name, string tag2Name) { try { while (true) { char ch = this.Parse(); if (ch == 0) { AttributeList tag = this.GetTag(); if ((tag.Name.ToLower() == tag1Name.ToLower()) || (tag.Name.ToLower() == tag2Name.ToLower())) { return(tag); } } } } catch (IndexOutOfRangeException) { throw new EOFException("Unexpected EOF where <" + tag1Name + "> or <" + tag2Name + "> is expected"); } }
public AttributeList LookForTagXML(string tagName, string parentEndTag) { try { while (true) { char ch = this.Parse(); if (ch == 0) { AttributeList tag = this.GetTag(); if (tag.Name.ToLower() == tagName.ToLower()) { return(tag); } if (tag.Name.ToLower() == parentEndTag.ToLower()) { throw new EOFException("Unexpected <" + parentEndTag + "> where <" + tagName + "> is expected"); } } } } catch (IndexOutOfRangeException) { throw new EOFException("Unexpected EOF where <" + tagName + "> is expected"); } }
public AttributeList ProcessTag(string tagName) { try { while (true) { char ch = this.Parse(); if (ch == 0) { AttributeList tag = this.GetTag(); if (tag.Name.ToLower() == tagName.ToLower()) { return(tag); } else { throw new BrowserEmulatorException("<" + tag.Name + "> where <" + tagName + "> is expected"); } } } } catch (IndexOutOfRangeException) { throw new EOFException("Unexpected EOF where <" + tagName + "> is expected"); } }