Ejemplo n.º 1
0
        public RestriccionXsd(XmlElement xmlElement) : this()
        {
            try {
                string tipoBase = TiposBaseXsd.Parse(xmlElement.Attributes["base"].Value);


                //sacar restricciones
                foreach (XmlNode restriccion in xmlElement.ChildNodes)
                {
                    Añadir(Restricciones.Parse(restriccion.Name), restriccion.Attributes["value"].Value);
                }
            } catch {
                throw new XsdException("El nodo no es de un restriccionXsd valido");
            }
        }
Ejemplo n.º 2
0
 public AtributoXsd(XmlNode source)
 {
     try {
         nombre = source.Attributes["name"].Value;
         tipo   = TiposBaseXsd.Parse(source.Attributes["type"].Value);
     } catch {
         if (source["ref"] == null)
         {
             throw new XsdException("El nodo no es de un atributoXsd valido");
         }
         else
         {
             nombre = source["ref"].Value;
         }
     }
     valorFijo       = source.Attributes["fixed"] != null ? source.Attributes["fixed"].Value : null;
     valorPorDefecto = source.Attributes["default"] != null ? source.Attributes["default"].Value : null;
 }