コード例 #1
0
        internal static CT_OleLink Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            CT_OleLink ctObj = new CT_OleLink();

            ctObj.idField     = XmlHelper.ReadString(node.Attributes["r:id"]);
            ctObj.progIdField = XmlHelper.ReadString(node.Attributes["progId"]);
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "oleItems")
                {
                    ctObj.oleItemsField = new List <CT_OleItem>();
                    foreach (XmlNode subNode in childNode.ChildNodes)
                    {
                        ctObj.oleItems.Add(CT_OleItem.Parse(subNode));
                    }
                }
            }
            return(ctObj);
        }
コード例 #2
0
        public static CT_ExternalLink Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_ExternalLink ctObj = new CT_ExternalLink();

            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "externalBook")
                {
                    ctObj.externalBookField = CT_ExternalBook.Parse(childNode, namespaceManager);
                    ctObj.itemField         = ctObj.externalBookField;
                    ctObj.itemType          = ExternalLinkItem.externalBook;
                }
                else if (childNode.LocalName == "ddeLink")
                {
                    ctObj.ddeLinkField = CT_DdeLink.Parse(childNode, namespaceManager);
                    ctObj.itemField    = ctObj.ddeLinkField;
                    ctObj.itemType     = ExternalLinkItem.ddeLink;
                }
                else if (childNode.LocalName == "oleLink")
                {
                    ctObj.oleLinkField = CT_OleLink.Parse(childNode, namespaceManager);
                    ctObj.itemField    = ctObj.oleLinkField;
                    ctObj.itemType     = ExternalLinkItem.oleLink;
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLstField = CT_ExtensionList.Parse(childNode, namespaceManager);
                    ctObj.itemField   = ctObj.extLstField;
                    ctObj.itemType    = ExternalLinkItem.extLst;
                }
            }
            return(ctObj);
        }