this is the code:
//declaration used to get data from xml code
PBDOM_BUILDER pbdom_builder_new
PBDOM_DOCUMENT pbdom_doc
PBDOM_OBJECT pbdom_obj_array_root[]
PBDOM_OBJECT pbdom_obj_array_data[]
int i
TRY
//parsing if parsing != succed return error
long ret
ret= XMLParseString(xml_code)
if ret<>0 then return ret
//string XMLTravco -> PBDOM_DOCUMENT pbdom_doc
pbdom_builder_new = Create PBDOM_Builder
pbdom_doc = pbdom_builder_new.BuildFromString(xml_code)
//getrootElement
pbdom_doc.GetRootElement().GetContent(ref
pbdom_obj_array_root)
//getdatasElement
for i=4 to upperbound(pbdom_obj_array_root) step 2
pbdom_obj_array_root[i].GetContent(ref
pbdom_obj_array_data)
//create country
add_country(pbdom_obj_array_data)
next
CATCH (PBDOM_Exception except)
MessageBox ('error', "PBDOM exception: " + except.Text)
CATCH ( PBXRuntimeError re )
MessageBox( 'error', "PBNI exception: " + re.getMessage() )
END TRY
I get no error with this code when I run it from the PB9
IDE.
thanks olivier.
ScenarioA:
1. If in the project painter you have selected the
pbdom90.pbd to be deployed as a dll, then the original
pbdom90.dll in the pb shared directory is overwritten by
this newly created dll.
2. Solution: a. Rename your pbdom90.pbd to something else
like pbdom90Ex.pbd. b. Include it in your PB application.
c.Then deploy the project. So your original pbdom90.dll
which is distributed with PB is not overwritten.
ScenarioB:
1. If in the project painter you have not selected the
pbdom90.pbd to be deployed as a dll, then only the PBDOM
objects referenced in your script get deployed to the EXE.
Eg:
pbdom_object[] obj
pbdom_document doc
doc.getContent(obj[]) will fail if it tries to create a
PBDOM class instance internally which is not referenced in
your script.
2. Solution: a. Reference all PBDOM classes in your
powerscript.
Thanks
GZACH.