public static CT_TextBody Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_TextBody ctObj = new CT_TextBody(); ctObj.p = new List <CT_TextParagraph>(); foreach (XElement childNode in node.ChildElements()) { 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 == "p") { ctObj.p.Add(CT_TextParagraph.Parse(childNode, namespaceManager)); } } return(ctObj); }
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); }