Unanswered Getting Started page on MSDN sample

  • 2010年12月17日 4:42
     
     

    Hi,

    I am following steps on Getting Started with Microsoft Translator > Using the HTTP API (http://msdn.microsoft.com/en-us/library/ff512387.aspx) and in the code snippets part:

    Text Box: WebResponse resp = req.GetResponse(); Stream strm = resp.GetResponseStream(); StreamReader reader = new System.IO.StreamReader(strm); string locale = reader.ReadToEnd(); Text Box: lblOutput.Text =

    locale would return an xml like:

    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">en</string>

    so the string should be parsed first before it would display as it's shown as the result

    8.jpg

    Am I missing something? or there's a bug in the sample? This would mislead NEW developers who would be the majority of readers of samples.

    Thanks. 

すべての返信

  • 2011年2月4日 3:07
    所有者
     
     
    Hi Khumara - I have asked our engineering team to look into this. Thanks for reporting it to us.
  • 2011年2月11日 1:04
     
     

    The output is a xml document with namespace on the elements. Yes, you should parse the document and get the value of the xml element.