View Full Version : Problems with XML.Load()
ajatem
03-08-2006, 09:05 AM
Hello, I´m new in Setup Factory.
I want to load a XML file a then modify some of it´s elements.
i try to do a XML.Load(path) but i get this error:
"attempt to index global `XML' (a nil value)"
need some help!!!...
thank you
Post the exact code that you are using inside of the code tags. It is probably a suntax error.
Adam.
ajatem
03-08-2006, 12:08 PM
this the part of the code
path = SessionVar.Expand("%AppFolder%\\Crpcpns.exe.config");
XML.Load(_TempFolder..path);
strXML = XML.GetXML();
Debug.Print(strXML);
ajatem
03-08-2006, 12:09 PM
i had an error in the previous post.
this is the part of the code
path = SessionVar.Expand("%AppFolder%\\Crpcpns.exe.config");
XML.Load(path);
strXML = XML.GetXML();
Debug.Print(strXML);
Gerty
12-28-2006, 03:28 AM
XML.Load same problem
error: On Post Install Line 5 attempt to index global `XML' (a nil value)"
code:
if (check02) then
path = SessionVar.Get("%ProgramFilesFolder%");
temp = SessionVar.Get("%WindowsFolder%");
text = TextFile.ReadToString(temp.."\\Temp\\1.txt");
XML.Load(path.."\\OpenOffice.org 2.0.1\\share\\config\\soffice.cfg\\modules\\swrite r\\menubar\\menubar.xml");
XML.InsertXML("menu:menubar", text, XML.INSERT_BEFORE);
end
HELP!
Maybe you are using an older version that did not include the XML actions? What version are you running?
Adam Kapilik
rpaul
01-25-2007, 01:22 AM
I want to load a XML file but I have this error code:
"attempt to index global `XML' (a nil value)"
This is in the Post Install Action:
XML.Load(SessionVar.Expand("%AppFolder%\\Config\\Config.xml"))
Where %AppFolder% = "C:\Program Files\Cible Qualité v2007.01.01"
This is combinaison of: %ProgramFilesFolder%\%ProductName% %ProductVer%
I test Setup Factory 7.0.3.0
can I suppose the patch 7.0.6.0 update this bug or the bug is in my path "C:\Program Files\Cible Qualité v2007.01.01"?
thanks
rpaul
01-25-2007, 07:42 PM
OK
With the update 7.0.6.0, no problem to load XML file with no error ...
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.