public static CT_Picture Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Picture ctObj = new CT_Picture(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "movie") { ctObj.movie = CT_Rel.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "control") { ctObj.control = CT_Control.Parse(childNode, namespaceManager); } else if (childNode.Prefix() == "o") { ctObj.ItemsElementName.Add(ItemsChoiceType9.office); ctObj.Items.Add(childNode); } else if (childNode.Prefix() == "v") { ctObj.ItemsElementName.Add(ItemsChoiceType9.vml); ctObj.Items.Add(childNode); } } return(ctObj); }
public static CT_Control Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Control ctObj = new CT_Control(); ctObj.name = XmlHelper.ReadString(node.Attribute("w:name")); ctObj.shapeid = XmlHelper.ReadString(node.Attribute("w:shapeid")); ctObj.id = XmlHelper.ReadString(node.Attribute("r:id")); return(ctObj); }
public static CT_Object Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Object ctObj = new CT_Object(); ctObj.dxaOrig = XmlHelper.ReadULong(node.Attribute("w:dxaOrig")); ctObj.dyaOrig = XmlHelper.ReadULong(node.Attribute("w:dyaOrig")); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "control") { ctObj.control = CT_Control.Parse(childNode, namespaceManager); } } return(ctObj); }