09-17-2008, 03:15 AM
Hi,
How come this works:
Macro
But the following throws this error: Error (RT) in Macro2: 0x80070057, The parameter is incorrect.
Note that the error cursor is always blinking at the CCxrt.SetChild line
Macro
Note that Child1 from Acc a is usually a 7 digit number but could be alphanumeric string.
Thanks for any help,
Stuart
How come this works:
Macro
str-- CCxmlfile="Test.xml"
if(!dir(CCxmlfile)) _s="<Category1></Category1>"; _s.setfile(CCxmlfile) ;;first time, create new file with no data
IXml-- CCxml
CCxml=CreateXml
CCxml.FromFile(CCxmlfile)
IXmlNode-- CCxrt = CCxml.RootElement ;;this will be often used
str Child1="hello"
str ChildAttributes="1[]3[]5"
CCxrt.SetChild(Child1 ChildAttributes)
CCxml.ToFile(CCxmlfile)But the following throws this error: Error (RT) in Macro2: 0x80070057, The parameter is incorrect.
Note that the error cursor is always blinking at the CCxrt.SetChild line
Macro
str-- CCxmlfile="Test.xml"
if(!dir(CCxmlfile)) _s="<Category1></Category1>"; _s.setfile(CCxmlfile) ;;first time, create new file with no data
IXml-- CCxml
CCxml=CreateXml
CCxml.FromFile(CCxmlfile)
IXmlNode-- CCxrt = CCxml.RootElement ;;this will be often used
str Child1
Acc a=acc(50 43 0 2);err
Child1=a.Name
str ChildAttributes="1[]3[]5"
CCxrt.SetChild(Child1 ChildAttributes)
CCxml.ToFile(CCxmlfile)Note that Child1 from Acc a is usually a 7 digit number but could be alphanumeric string.
Thanks for any help,
Stuart
