Esempio n. 1
0
        public static DomNode FromObj(object instance)
        {
            if (instance == null)
            {
                return(null);
            }
            try{
                switch ((int)GetProperty(instance, "nodeType"))
                {
                case 1:         return(Element.FromObj(instance));

                case 3:         return(DomText.FromObj(instance));

                default:        return(new DomNode(instance));
                }
            }catch (System.Exception e) {
                throw new System.ArgumentException("指定したオブジェクトは DomNode ではありません。", "instance", e);
            }
        }
Esempio n. 2
0
 public DomText createTextNode(string text)
 {
     return(DomText.FromObj(this.Invoke("createTextNode", text)));
 }