Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - "Missing Object" when modifying XML

Reply
 
Old 09-22-2008   #1 (permalink)
Todd Walton


 
 

"Missing Object" when modifying XML

I am having a heck of a time figuring out how to simply add one
element in an XML file.

<?xml version="1.0" encoding="utf-8"?>
<ScanControl>
<TargetInfo>
<WindowsScan enabled="true"/>
<OptionSet name="default">
<WBEM enabled="true"/>
<SNMP enabled="true"/>
</OptionSet>
<IPScan enabled="true">
<IPRange start="192.168.67.2" end="192.168.67.254"
credentials="Default" options="Default"/>
</IPScan>
</TargetInfo>
</ScanControl>

I'd like to script adding additional <IPRange> elements. I found the
following helpful posts in this newsgroup:

http://preview.tinyurl.com/4kckst
http://preview.tinyurl.com/3u9bl7

and this MSDN page: http://msdn.microsoft.com/en-us/libr...81(VS.85).aspx.

So I'm trying to adapt Anthony Jones's AddElem functions to my
situation. I keep getting this frustrating "missing object" error
when I run the script. I broke everything down to where I had a
simple script that just created a dom, loaded the XML file, and then
Wscript.Echo'd the dom.documentElement, and yet still it said "missing
object: dom.documentElement". Very frustrating, yes. You'd think the
thing would know what the documentElement is. But also a happy
moment, because it means I've isolated the problem.

Turns out I was using .loadXML when what I wanted was the .load
method. Thank you all for listening.

-todd

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Error: "Cannot convert "System.Object[]" to "System.Int32"." PowerShell
Missing "Documents" and "Music" folder. Vista General
Missing "Documents" and "Music" folders after upgrade from Windows XP. Anyone know how to recreate them? Vista installation & setup
Separate hashtable vs $alist | where-object { "key" = "value" } versus something else? PowerShell
False IE doc body error - "Object reference not set to an instance of an object" PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46