2 // Microsoft.Web.Services.Addressing.AttributedUriString
4 // Author: Todd Berman <tberman@gentoo.org>
6 // (C) 2003 Todd Berman
10 using Microsoft.Web.Services.Xml;
12 namespace Microsoft.Web.Services.Addressing
15 public abstract class AttributedUriString : OpenAttributeElement
20 public AttributedUriString () : base ()
24 public AttributedUriString (string uri)
27 throw new ArgumentNullException ("uri");
32 public void GetXmlUri (XmlDocument document, XmlElement element)
35 throw new ArgumentNullException ("element");
37 element.InnerText = _uri;
38 GetXmlAny (document, element);
41 public void LoadXmlUri (XmlElement element)
44 throw new ArgumentNullException ("element");
46 ValidateSchema (element);
48 _uri = element.InnerText;
51 public void ValidateSchema (XmlElement element)
53 if(element.ChildNodes.Count >= 2) {
54 throw new AddressingFormatException ("wsa_InvalidAttributeUri");
56 if(element.ChildNodes.Count == 1 && !(element.FirstChild is XmlText)) {
57 throw new AddressingFormatException ("wsa_InvalidAttributeUri");