public static CT_DefaultShapeDefinition Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_DefaultShapeDefinition ctObj = new CT_DefaultShapeDefinition(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "spPr") { ctObj.spPr = CT_ShapeProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "bodyPr") { ctObj.bodyPr = CT_TextBodyProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "lstStyle") { ctObj.lstStyle = CT_TextListStyle.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "style") { ctObj.style = CT_ShapeStyle.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "extLst") { ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_ObjectStyleDefaults Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_ObjectStyleDefaults ctObj = new CT_ObjectStyleDefaults(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "spDef") { ctObj.spDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "lnDef") { ctObj.lnDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "txDef") { ctObj.txDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "extLst") { ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }