Bug #6382
XML serialization for ATTRIBUTE and TEXT XML-NODE-TYPE fields
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version:
History
#2 Updated by Constantin Asofiei about 2 years ago
6129a/13861 adds missing runtime support for TEXT and ATTRIBUTE XML-NODE-TYPE field option. This fixes the table (de)serialization, but the schema needs investigation and fixes, and maybe some more comprehensive tests for TEXT/ATTRIBUTE fields.
def temp-table tt1 field f1 as int xml-node-type "attribute" field f2 as int xml-node-type "hidden" init 12345 field f3 as int xml-node-type "element" xml-data-type "int". def temp-table tt2 field f1 as int xml-node-type "attribute" field f2 as int serialize-hidden init 45678 field f3 as int xml-node-type "text". def dataset ds1 for tt1, tt2. def var lc as longchar. create tt1. tt1.f1 = 10. tt1.f2 = 20. tt1.f3 = 30. create tt2. tt2.f1 = 100. tt2.f2 = 200. tt2.f3 = 300. dataset ds1:write-xml("file", "ttser-ds1.txt", true, ?, ?, true). buffer tt1:write-xml("file", "ttser-tt1.txt", true, ?, ?, true). buffer tt2:write-xml("file", "ttser-tt2.txt", true, ?, ?, true). buffer tt1:read-xml("file", "ttser-tt1.txt", "empty", ?, ?). buffer tt2:read-xml("file", "ttser-tt2.txt", "empty", ?, ?). find first tt1. find first tt2. message tt1.f1 tt1.f2 tt1.f3 tt2.f1 tt2.f2 tt2.f3. dataset ds1:read-xml("file", "ttser-ds1.txt", "empty", ?, ?). find first tt1. find first tt2. message tt1.f1 tt1.f2 tt1.f3 tt2.f1 tt2.f2 tt2.f3.