Sample code for 30+ languages & platforms
PowerBuilder

Load XML from Local FilePath

Demonstrates how to load XML from a local XML file.

Chilkat PowerBuilder Downloads

PowerBuilder
integer li_rc
integer li_Success
oleobject loo_Xml

li_Success = 0

loo_Xml = create oleobject
li_rc = loo_Xml.ConnectToNewObject("Chilkat.Xml")
if li_rc < 0 then
    destroy loo_Xml
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// Pass either an absolute file path, or a file path relative from the current working directory of the caller.
li_Success = loo_Xml.LoadXmlFile("qa_data/hamlet.xml")
if li_Success = 0 then
    Write-Debug loo_Xml.LastErrorText
    destroy loo_Xml
    return
end if

Write-Debug "Success."


destroy loo_Xml