Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ericeijkelenboom/2760890 to your computer and use it in GitHub Desktop.
Save ericeijkelenboom/2760890 to your computer and use it in GitHub Desktop.
CreateLocalExtensionXmlElement
private static XmlElement[] CreateLocalExtensionXmlElement()
{
const string xml = "<documentParts><documentPart variantIndex=\"{0}\" documentPartIndex=\"{1}\" documentPartPropertyText=\"{2}\"><fileName>{3}</fileName><byteArray><![CDATA[{4}]]></byteArray></documentPart></documentParts>";
var xmlDocument = new XmlDocument();
xmlDocument.LoadXml(string.Format(xml, 0, 0, DocumentPartPropertyText, "Lorem ipsum dolor sit amet.pdf", CreateFile()));
return new[] {xmlDocument.DocumentElement};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment