Word to xml conversion

Does ASPOSE Word support word to xml conversion??

Hi Waheed,

Thanks for your interest in Aspose.Words for Cloud. Yes, you can save the document in the Microsoft Word 2003 WordprocessingML format. Please see the following code for example:

AsposeApp.AppSID = "your AppSID";
AsposeApp.AppKey = "your AppKey";
string fileName = "Source.docx";
// build URI to convert MS Word file to other format using storage
string strURI = "http://api.aspose.com/v1.1/words/" + fileName + "?format=wml";
// sign URI
string signedURI = Utils.Sign(strURI);
// get response stream
Stream responseStream = Utils.ProcessCommand(signedURI, "GET");
using (Stream fileStream = System.IO.File.OpenWrite("c:\\temp\\MyFile.xml"))
{
    Utils.CopyStream(responseStream, fileStream);
}
responseStream.Close();
public static string Sign(string url)
{
    try
    {
        // Add appSID parameter.
        UriBuilder builder = new UriBuilder(url);

        if (builder.Query != null && builder.Query.Length > 1)
            builder.Query = builder.Query.Substring(1) + "&appSID=" +   AsposeApp.AppSID;
        else
            builder.Query = "appSID=" +  AsposeApp.AppSID;

        // Remove final slash here as it can be added automatically.
        builder.Path = builder.Path.TrimEnd('/');

        // Compute the hash.
        byte[] privateKey = System.Text.Encoding.UTF8.GetBytes(AsposeApp.AppKey);
        System.Security.Cryptography.HMACSHA1 algorithm = new System.Security.Cryptography.HMACSHA1(privateKey);

        byte[] sequence = System.Text.ASCIIEncoding.ASCII.GetBytes(builder.Uri.AbsoluteUri);
        byte[] hash = algorithm.ComputeHash(sequence);
        string signature = Convert.ToBase64String(hash);

        // Remove invalid symbols.
        signature = signature.TrimEnd(' = ');
        signature = System.Web.HttpUtility.UrlEncode(signature);

        // Convert codes to upper case as they can be updated automatically.
        signature = System.Text.RegularExpressions.Regex.Replace(signature,
        "%[0-9a-f]{2}", e => e.Value.ToUpper());
        // Add the signature to query string.
        return string.Format("{0}&signature={1}", builder.Uri.AbsoluteUri, signature);
    }
    catch (Exception ex)
    {
        throw new Exception(ex.Message);
    }
}

I hope, this helps.

Best regards,