I am using the standard XML library that comes with Genero 4GL. I am trying to save the XML document to a specific directory based on a variable in a properties file. I can see that it is getting the correct path, AND I can verify that the permissions on the folders it is going to is 777 (it's Linux based). However, I keep getting an "unable to open resource for writing" error when I get to the save
call.
try
let doc = xml.domDocument.create()
call doc.setXmlStandalone(true)
let report_node = doc.createDocumentFragment()
call xml.Serializer.VariableToDom(rpt_rec[1], report_node)
call doc.appendDocumentNode(report_node)
call doc.normalize()
call doc.setFeature("format-pretty-print", true)
call doc.save(xml_file)
return true
catch
for i=1 to doc.getErrorsCount()
display "[", i, "] ", status, " ", doc.getErrorDescription(i)
end for
return false
end try
I haven't been able to find anything in the Genero documentation as to why I am getting this error. The only thing I know is that if I just save the XML to the /tmp
directory, it works. But if I try to save anywhere else, it doesn't.
Can anyone please provide some insight as to why I can only save my XML document to the /tmp
directory even though the permissions on the folder I want it to go to are correct? Thanks.