我正在运行xml请求以在Quickbooks POS中获取Item Picture并返回此响应:
string response = <?xml version="1.0" encoding="windows-1252"?>
<QBPOSXML>
<QBPOSXMLMsgsRs>
<ItemInventoryPicturesQueryRs requestID="912873739" statusCode="0" statusMessage="Status OK" statusSeverity="Info">
<ItemInventoryPicturesRet>
<ListID>5523943659390533889</ListID>
<ItemInventoryPicture>
<EncodedPicture>/9j/4AAQSkZJRgABAgEAAAAAAAD...</EncodedPicture>
<PictureName></PictureName>
</ItemInventoryPicture>
</ItemInventoryPicturesRet>
</ItemInventoryPicturesQueryRs>
</QBPOSXMLMsgsRs>
</QBPOSXML>
我想将编码的图片部分保存为jpg文件,我尝试了这种方法,但它根本不起作用!
public static byte[] StrToByteArray(string str)
{
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding();
return encoding.GetBytes(str);
}
//imageCode is the value of the EncodedPicture element in the xml
File.WriteAllBytes(@"C:\Temp\image.jpg",StrToByteArray(imagecodes));
这是上图中的base64
/9j/4AAQSkZJRgABAgEAAAAAAAD/7QAwUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAgcAgAAAgACADhCSU0ECwAAAAAAAP/gABBKRklGAAEBAQBIAEgAAP/bAEMABgQFBgUEBgYFBgcHBggKEAoKCQkKFA4PDBAXFBgYFxQWFhodJR8aGyMcFhYgLCAjJicpKikZHy0wLSgwJSgpKP/bAEMBBwcHCggKEwoKEygaFhooKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKP/CABEIAQABAAMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAABgIDBAUHAQj/xAAaAQEAAwEBAQAAAAAAAAAAAAAAAQMEBQIG/9oADAMBAAIQAxAAAAHqgAAAAAAEM1uvM+97nFqZxmGHXFFYAAAAAAAAAAAj0h5AafZxvNJLmxvNJLGs6KEw6b85/RgAAAAAAAAAAA+f/oCBHIcqRwo32dqpKauJ3LBV9TfK/wBQmS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jS0G49o+P15o5U8urjtF5WAD8vx0lq8WFU/hhDCLu4J7J2pQVTo3HzTTaykEYGJbN81gBRUwRZJYZmODvoh2Va5YFN2kKvcOSZfKwD/AEVc9mBaeBY9lSnRyzBCccU6HKEISs6jDknT65qWhP8AZ5pmxJsJPYbc47YqF3icdBkZ0BKri1HJgPTBVbgqtuGlHBnKi+E0FQsiQXNw+KurcIjwEE7COUrWPaeLsPF+SjwEBGgW+IPdNT3jAJE5py6uEh2kX803LPLfuNEtL4PFBNaBCkpWAsM+MlQ5wNCZjamY3lXMH10EhuNL1O9p/T1Fby2AGO81MmSFPToeP+UoFyX4IFkdL70oQi75pryVZzQBverEFMOGlNTwWF3IoO0MS+St8UEJVLCDEnfP25NNgmVQDzEeaMmBELmtk90Qxe16aWBu1LKt+g3ZoW0kXTkugUMMOgwrL408fcLNmqFnytjbjtQIIyNHKuTosU+BSrTYxeck+D1PepLxkE9xy/chz6CkSj75bT4B8x5qcCszR4daEumGq1KicnccZHmKXzSi/wC+6HBb6n//2Q==
答案 0 :(得分:4)
我怀疑很少有JPEG文件也是可打印的ASCII文本。
EncodedPicture
的内容似乎更有可能是数据的base64表示 - 这可以通过问题底部的文字进行确认。
假设您已经将EncodedPicture
元素的值提取为字符串,那么您只需要Convert.FromBase64String
:
File.WriteAllBytes(@"C:\Temp\image.jpg", Convert.FromBase64String(imagecodes));