<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBS: XMLDOM]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=5262</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5262&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBS: XMLDOM».]]></description>
		<lastBuildDate>Thu, 09 Dec 2010 15:21:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBS: XMLDOM]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=42741#p42741</link>
			<description><![CDATA[<p>Microsoft прямо рекомендует использовать даже «версионный» ProgID, не «version-independent»: начиная с <a href="http://msdn.microsoft.com/en-us/library/ms757837(VS.85).aspx">GUID and ProgID Information</a> — и внутрь по дереву. Своего мнения на этот счёт у меня нет — не работал.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Thu, 09 Dec 2010 15:21:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=42741#p42741</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: XMLDOM]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=42740#p42740</link>
			<description><![CDATA[<p>Спасибо огромное! А можно просветить насчет MSXML2.DOMDocument и Microsoft.XMLDOM, что лучше использовать?</p>]]></description>
			<author><![CDATA[null@example.com (SlaDER)]]></author>
			<pubDate>Thu, 09 Dec 2010 14:43:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=42740#p42740</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: XMLDOM]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=42712#p42712</link>
			<description><![CDATA[<p>Использовать не «root.appendChild()», а выбранный узел:<br /></p><div class="codebox"><pre><code>Option Explicit

Dim strQuery

With WScript.CreateObject(&quot;MSXML2.DOMDocument&quot;) &#039; &quot;Microsoft.XMLDOM&quot;)
    .async = False
    
    If .load(&quot;E:\Песочница\0020\0001.rdp&quot;) Then
        strQuery = &quot;RDCMan/file/group&quot;
        
        .setProperty &quot;SelectionLanguage&quot;, &quot;XPath&quot;
        .selectNodes(strQuery).item(0).appendChild .createElement(&quot;server&quot;)
        
        WScript.Echo .xml
    End If
End With

WScript.Quit 0</code></pre></div><p>У Вас ошибка: указан тэг «&lt;<strong>s</strong>erver&gt;», а узел создаётся «<strong>S</strong>erver».</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Wed, 08 Dec 2010 16:18:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=42712#p42712</guid>
		</item>
		<item>
			<title><![CDATA[VBS: XMLDOM]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=42708#p42708</link>
			<description><![CDATA[<p>Привет всем есть XML от Remote Desktop Connection Manager.</p><div class="codebox"><pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;RDCMan schemaVersion=&quot;1&quot;&gt;
    &lt;version&gt;2.2&lt;/version&gt;
    &lt;file&gt;
        &lt;properties&gt;
            &lt;name&gt;Название&lt;/name&gt;
            &lt;expanded&gt;True&lt;/expanded&gt;
            &lt;comment/&gt;
            &lt;logonCredentials inherit=&quot;FromParent&quot;/&gt;
            &lt;connectionSettings inherit=&quot;FromParent&quot;/&gt;
            &lt;gatewaySettings inherit=&quot;FromParent&quot;/&gt;
            &lt;remoteDesktop inherit=&quot;FromParent&quot;/&gt;
            &lt;localResources inherit=&quot;FromParent&quot;/&gt;
            &lt;securitySettings inherit=&quot;FromParent&quot;/&gt;
            &lt;displaySettings inherit=&quot;FromParent&quot;/&gt;
        &lt;/properties&gt;
        &lt;group&gt;

        &lt;/group&gt;
    &lt;/file&gt;
&lt;/RDCMan&gt;</code></pre></div><p>Задача добавлять в group</p><div class="codebox"><pre><code>         &lt;server&gt;
                    &lt;name&gt;Имя_сервера&lt;/name&gt;
                    &lt;displayName&gt;Отображаемое имя сервера&lt;/displayName&gt;
                    &lt;comment /&gt;
                    &lt;logonCredentials inherit=&quot;FromParent&quot; /&gt;
                    &lt;connectionSettings inherit=&quot;FromParent&quot; /&gt;
                    &lt;gatewaySettings inherit=&quot;FromParent&quot; /&gt;
                    &lt;remoteDesktop inherit=&quot;FromParent&quot; /&gt;
                    &lt;localResources inherit=&quot;FromParent&quot; /&gt;
                    &lt;securitySettings inherit=&quot;FromParent&quot; /&gt;
                    &lt;displaySettings inherit=&quot;FromParent&quot; /&gt;
         &lt;/server&gt;</code></pre></div><p>Пытаюсь так:</p><div class="codebox"><pre><code>Set objxmlDoc = CreateObject( &quot;Microsoft.XMLDOM&quot; )
objxmlDoc.Async = &quot;False&quot;
objxmlDoc.Load( &quot;c:\Windows.rdg&quot; )

strQuery = &quot;RDCMan/file/group&quot;

Set colNodes = objxmlDoc.selectNodes(strQuery)

Set newXML = objxmlDoc.createElement(&quot;Server&quot;)

Set root = objxmlDoc.documentElement
root.appendChild(newXML)</code></pre></div><p>В итоге идет добавление в конец, как можно зацепиться за group и добавить child в неё?</p>]]></description>
			<author><![CDATA[null@example.com (SlaDER)]]></author>
			<pubDate>Wed, 08 Dec 2010 11:57:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=42708#p42708</guid>
		</item>
	</channel>
</rss>
