private PackagePart Save(XmlDocument document, string entryName, string contentType) { Uri uri = PackUriHelper.CreatePartUri(new Uri(entryName, UriKind.Relative)); PackagePart entry = xlsxZip.CreatePart(uri, contentType); XmlTreeOperations.SaveDocument(document, entry.GetStream(), true); return(entry); }
public static XmlDocument XMLFromBase64Binary(byte[] xmlString) { return(XmlTreeOperations.LoadXmlBinary(xmlString)); }
public static XmlDocument XMLFromString(string xmlString) { return(XmlTreeOperations.LoadXml(xmlString)); }
public static byte[] XMLToBase64Binary(XmlNode xmlTree, string encoding, string byteorder, bool bBOM) { return(XmlTreeOperations.SaveXmlBinary((XmlDocument)xmlTree, encoding, System.String.Compare(byteorder, "big endian", true) == 0, bBOM, false)); }
public static string XMLToString(XmlNode xmlTree) { return(XmlTreeOperations.SaveXml((XmlDocument)xmlTree, false)); }
public static byte[] XMLToBase64Binary(XmlNode xmlTree, string encoding) { return(XmlTreeOperations.SaveXmlBinary((XmlDocument)xmlTree, encoding, false)); }