![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | "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 Specs![]() |
![]() |
| 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 | |||