<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic XmlDictionaryReader to XML file in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/xmldictionaryreader-to-xml-file/m-p/9312480#M36717</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am playing around with the Revit Server REST API SDK example. I am slowly understanding how it works.&lt;/P&gt;&lt;P&gt;I understand that you make a request and then you get a response in json format, which we then transform with the XmlDictionaryReader to an xml (is that right?). To continue understanding the SDK example I would like to see how that request looks like in xml format. So far I have tried the following:&lt;/P&gt;&lt;PRE&gt;  XmlDictionaryReader reader = GetResponse(path + "/contents");
           File.WriteAllText("D:\\xmltest.txt", reader.ReadString());&lt;/PRE&gt;&lt;P&gt;but this doesn't return anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to export the Request response as an xml? I am very lost in this as I am not used to deal with json or xml programmatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2020 10:42:16 GMT</pubDate>
    <dc:creator>H.echeva</dc:creator>
    <dc:date>2020-02-12T10:42:16Z</dc:date>
    <item>
      <title>XmlDictionaryReader to XML file</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/xmldictionaryreader-to-xml-file/m-p/9312480#M36717</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am playing around with the Revit Server REST API SDK example. I am slowly understanding how it works.&lt;/P&gt;&lt;P&gt;I understand that you make a request and then you get a response in json format, which we then transform with the XmlDictionaryReader to an xml (is that right?). To continue understanding the SDK example I would like to see how that request looks like in xml format. So far I have tried the following:&lt;/P&gt;&lt;PRE&gt;  XmlDictionaryReader reader = GetResponse(path + "/contents");
           File.WriteAllText("D:\\xmltest.txt", reader.ReadString());&lt;/PRE&gt;&lt;P&gt;but this doesn't return anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to export the Request response as an xml? I am very lost in this as I am not used to deal with json or xml programmatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 10:42:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/xmldictionaryreader-to-xml-file/m-p/9312480#M36717</guid>
      <dc:creator>H.echeva</dc:creator>
      <dc:date>2020-02-12T10:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: XmlDictionaryReader to XML file</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/xmldictionaryreader-to-xml-file/m-p/9313252#M36718</link>
      <description>&lt;P&gt;Run your code in the debugger and take a look at the contents and properties of your reader variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 15:26:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/xmldictionaryreader-to-xml-file/m-p/9313252#M36718</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-02-12T15:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: XmlDictionaryReader to XML file</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/xmldictionaryreader-to-xml-file/m-p/9315378#M36719</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I couldn't make this to work. Using the debugger I see a lot of information but couldn't find the xml itself (see image).&lt;/P&gt;&lt;P&gt;I made some research and apparently this is not as easy as using only one method. I think it is necessary to loop through the nodes and export them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-02-13_09h21_55.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/729232i580848E880CBC5B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-02-13_09h21_55.png" alt="2020-02-13_09h21_55.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 10:23:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/xmldictionaryreader-to-xml-file/m-p/9315378#M36719</guid>
      <dc:creator>H.echeva</dc:creator>
      <dc:date>2020-02-13T10:23:15Z</dc:date>
    </item>
  </channel>
</rss>

