<?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 Writing to XML in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Writing-to-XML/m-p/255050#M8730</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I have been trying to write to an XML file as a way of cataloging placed configurations of the object. I have no problems reading and writing to XML except I cannot for the life of me create a new element on its own line.&lt;BR /&gt;
regardless of the RecordID I use the new element is always placed on the same line as the position descriptor rather than its own line.&lt;BR /&gt;
&lt;BR /&gt;
this is the basic structure of the XML ("---" are there just to show the structure because this forum wasn't recognizing the tabs or spaces)&lt;BR /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;
&amp;lt;dataroot&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 01&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.48&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.24&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.8&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;/Model&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 02&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.24&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.48&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.4&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;/Model&amp;gt;&lt;BR /&gt;
&amp;lt;/dataroot&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
I want to copy the last "Model" and place in below and then modify its properties (x,y,z). I have tried different position descriptors and all of the "AsLastChild", "AsPreviousSibling" and so on statements but i always end up with something like this.&lt;BR /&gt;
&amp;lt;dataroot&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 01&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.48&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.24&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.8&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;/Model&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 02&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.24&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.48&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.4&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 02&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.24&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.48&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.4&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;/Model&amp;gt;&amp;lt;/Model&amp;gt;&lt;BR /&gt;
&amp;lt;/dataroot&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
I have tried more basic functions but no matter what it always end up on the same line as the position descriptor&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 02 Feb 2016 05:06:44 GMT</pubDate>
    <dc:creator>Kristian Bursell</dc:creator>
    <dc:date>2016-02-02T05:06:44Z</dc:date>
    <item>
      <title>Writing to XML</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Writing-to-XML/m-p/255050#M8730</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I have been trying to write to an XML file as a way of cataloging placed configurations of the object. I have no problems reading and writing to XML except I cannot for the life of me create a new element on its own line.&lt;BR /&gt;
regardless of the RecordID I use the new element is always placed on the same line as the position descriptor rather than its own line.&lt;BR /&gt;
&lt;BR /&gt;
this is the basic structure of the XML ("---" are there just to show the structure because this forum wasn't recognizing the tabs or spaces)&lt;BR /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;
&amp;lt;dataroot&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 01&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.48&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.24&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.8&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;/Model&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 02&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.24&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.48&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.4&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;/Model&amp;gt;&lt;BR /&gt;
&amp;lt;/dataroot&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
I want to copy the last "Model" and place in below and then modify its properties (x,y,z). I have tried different position descriptors and all of the "AsLastChild", "AsPreviousSibling" and so on statements but i always end up with something like this.&lt;BR /&gt;
&amp;lt;dataroot&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 01&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.48&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.24&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.8&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;/Model&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 02&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.24&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.48&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.4&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;Model&amp;gt;&lt;BR /&gt;
------&amp;lt;name&amp;gt;Config 02&amp;lt;/name&amp;gt;&lt;BR /&gt;
------&amp;lt;x&amp;gt;0.24&amp;lt;/x&amp;gt;&lt;BR /&gt;
------&amp;lt;y&amp;gt;0.48&amp;lt;/y&amp;gt;&lt;BR /&gt;
------&amp;lt;z&amp;gt;0.4&amp;lt;/z&amp;gt;&lt;BR /&gt;
---&amp;lt;/Model&amp;gt;&amp;lt;/Model&amp;gt;&lt;BR /&gt;
&amp;lt;/dataroot&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
I have tried more basic functions but no matter what it always end up on the same line as the position descriptor&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Feb 2016 05:06:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Writing-to-XML/m-p/255050#M8730</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2016-02-02T05:06:44Z</dc:date>
    </item>
  </channel>
</rss>

