Exemple #1
0
        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);
        }
Exemple #2
0
 public static XmlDocument XMLFromBase64Binary(byte[] xmlString)
 {
     return(XmlTreeOperations.LoadXmlBinary(xmlString));
 }
Exemple #3
0
 public static XmlDocument XMLFromString(string xmlString)
 {
     return(XmlTreeOperations.LoadXml(xmlString));
 }
Exemple #4
0
 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));
 }
Exemple #5
0
 public static string XMLToString(XmlNode xmlTree)
 {
     return(XmlTreeOperations.SaveXml((XmlDocument)xmlTree, false));
 }
Exemple #6
0
 public static byte[] XMLToBase64Binary(XmlNode xmlTree, string encoding)
 {
     return(XmlTreeOperations.SaveXmlBinary((XmlDocument)xmlTree, encoding, false));
 }