Beispiel #1
0
        public override bool readFromXmlElement(XmlNode pCurNode)
        {
            XmlElement ele = (XmlElement)pCurNode;

            if (ele.Name != "CardType")
            {
                s_errorString = "error xml type error for CardType";
                return(false);
            }

            if (ele.HasAttribute("caType") == false)
            {
                s_errorString = "error xml type CardType do not have caType attribute";
                return(false);
            }

            m_nValue = int.Parse(ele.GetAttribute("caType"));

            XmlNode pchild = pCurNode.FirstChild;

            while (pchild != null)
            {
                NodeCardValue pnodeChild = new NodeCardValue(0);
                pnodeChild.readFromXmlElement(pchild);
                addChildNode(pnodeChild);
                pchild = pchild.NextSibling;
            }
            return(true);
        }
Beispiel #2
0
        public override bool readFromXmlElement(XmlNode pCurNode)
        {
            XmlElement ele = (XmlElement)pCurNode;
            if (ele.Name != "CardType")
            {
                s_errorString = "error xml type error for CardType";
                return false;
            }

            if (ele.HasAttribute("caType") == false)
            {
                s_errorString = "error xml type CardType do not have caType attribute";
                return false;
            }

            m_nValue = int.Parse(ele.GetAttribute("caType"));

            XmlNode pchild = pCurNode.FirstChild;
            while (pchild != null)
            {
                NodeCardValue pnodeChild = new NodeCardValue(0);
                pnodeChild.readFromXmlElement(pchild);
                addChildNode(pnodeChild);
                pchild = pchild.NextSibling;
            }
            return true;
        }