private static StartTag CreateStartTag(string startTag, List <Attribute> startTagAttributes) { StartTag sTag = new StartTag(startTag); foreach (var attr in startTagAttributes) { sTag.Attribute = attr; } return(sTag); }
internal override XmlNodeSyntax CreateXmlNode() { var nodeList = CreateNodeList(); XmlElementSyntax elementSyntax; if (nodeList.Count == 1) { elementSyntax = SyntaxFactory.XmlExampleElement( SyntaxFactory.SingletonList <XmlNodeSyntax>( nodeList.First())); } else { elementSyntax = SyntaxFactory.XmlExampleElement( nodeList); } if (StartTag != null && EndTag != null) { elementSyntax = elementSyntax .WithStartTag(StartTag.CreateTag()) .WithEndTag(EndTag.CreateTag()); } return(elementSyntax); }