public class XMLInput{public string xml { get; set; }public string DecodeBase64(){var valueBytes = System.Convert.FromBase64String(this.xml);return Encoding.UTF8.GetString(valueBytes);}}
public async Task<string> PublishXMLAsync([FromBody] XMLInput xmlInput){string data = xmlInput.DecodeBase64();}
一旦解码,您将获得原始xml
<?xml version="1.0" encoding="utf-8" ?><Structures><inputs># This program adds two numbers
num1 = 1.5num2 = 6.3
# Add two numberssum = num1 + num2
# Display the sumprint('The sum of {0} and {1} is {2}'.format(num1, num2, sum))</inputs></Structures>
const obj = {myMultiLineString: `This is written in a \multiline way. \The backside of it is that you \can't use indentation on every new \line because is would be included in \your string. \The backslash after each line escapes the carriage return.`}