The problem is the following:
Changing the values of an xbComplexType that is part of the XML Document
will only update the :XMLArray and :VarList iVars, but not the :eDocument
iVar, which contains the (original) XML text.
It will also leave the :IsEncoded iVar set to TRUE, which apparently
controls how the :AsString() method works.
Because :IsEncoded is TRUE, the :AsString() method just prints the
(unchanged) :eDocument iVar, rather than re-parsing :XMLArray or VarList.
There is an easy workaround for this, though:
Before using oXML:AsString(), add the following two lines:
The first line will add a new (empty) Variable to the XML Document, which
will set the :IsEncoded iVar to FALSE. The second line removes that new
Because the :IsEncoded iVar is now FALSE, the :AsString() method will
re-parse the XML Document and update the :eDocument iVar, which it will
then return. It will also set the :IsEncoded iVar back to TRUE, so that the
next time the :AsString() method is called, it will just return the existing
:eDocument iVar, to save time.
Hope that helps,
Absolute Software, LLC
phone: (989) 723-9927