private byte[] LoadXmlFileAsWBXML(string filePath) { var xml = LoadXmlFile(filePath); var encoder = new ASWBXML(); encoder.LoadXml(xml); return(encoder.GetBytes()); }
// This function uses the ASWBXML class to encode // XML into a WBXML stream. private byte[] EncodeXMLString(string xmlString) { try { ASWBXML encoder = new ASWBXML(); encoder.LoadXml(xmlString); return(encoder.GetBytes()); } catch (Exception ex) { ASError.ReportException(ex); return(null); } }
internal static byte[] Encode(string stringXML) { try { ASWBXML encoder = new ASWBXML(); encoder.LoadXml(stringXML); return(encoder.GetBytes()); } catch (Exception ex) { LogService.Log("ASXML", "Failed to encode content: " + ex.Message); throw; } }
private byte[] EncodeXMLString(string stringXML) { try { ASWBXML encoder = new ASWBXML(); encoder.LoadXml(stringXML); return(encoder.GetBytes()); } catch (Exception ex) { //VSError.ReportException(ex); MessageBox.Show("Exception: \r\n" + ex.ToString(), "Error"); System.Diagnostics.Debug.WriteLine("--------------------------"); System.Diagnostics.Debug.WriteLine("Exception:"); System.Diagnostics.Debug.WriteLine(" Message: " + ex.Message); System.Diagnostics.Debug.WriteLine(" Stack: " + ex.StackTrace); return(null); } }