private RelaxngNameChoice ReadNameClassChoice() { RelaxngNameChoice nc = new RelaxngNameChoice(); FillLocation(nc); if (IsEmptyElement) { throw new RelaxngException("Name choice must have at least one name class."); } Read(); while (NodeType != XmlNodeType.EndElement) { nc.Children.Add(ReadNameClass()); } if (nc.Children.Count == 0) { throw new RelaxngException("Name choice must have at least one name class."); } expectEnd("choice"); return(nc); }
private RelaxngNameChoice ReadNameClassChoice () { RelaxngNameChoice nc = new RelaxngNameChoice (); FillLocation (nc); if (IsEmptyElement) throw new RelaxngException ("Name choice must have at least one name class."); Read (); while (NodeType != XmlNodeType.EndElement) { nc.Children.Add (ReadNameClass ()); } if (nc.Children.Count == 0) throw new RelaxngException ("Name choice must have at least one name class."); expectEnd ("choice"); return nc; }
public void WriteNameChoice (RelaxngNameChoice c) { WriteNames (c.Children, false); }