Hello,
I'm trying to use the WRITE-XML method on a ProDataSet to generate an XML for an external party.
Example:
DEFINE TEMP-TABLE tt
FIELD a AS CHAR.
DEFINE TEMP-TABLE tt2
FIELD b AS CHAR.
DEFINE TEMP-TABLE tt3
FIELD c AS CHAR.
DEFINE DATASET ds
NAMESPACE-URI "http://www.somewhere.com/something/"
FOR tt, tt2, tt3
DATA-RELATION FOR tt2, tt3 NESTED RELATION-FIELDS(b,c).
CREATE tt.
CREATE tt2.
CREATE tt3.
DATASET ds:WRITE-XML("file","test.xml",TRUE,"UTF-8","schema.xsd",FALSE,FALSE).
This produces this XML:
<?xml version="1.0" encoding="UTF-8"?>
<ds xmlns="http://www.somewhere.com/something/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.somewhere.com/something/ schema.xsd">
<tt xmlns="http://www.somewhere.com/something/">
<a/>
</tt>
<tt2 xmlns="http://www.somewhere.com/something/">
<b/>
<tt3>
<c/>
</tt3>
</tt2>
</ds>
Anybody know why the xmlns attribute is - to my opinion unnecessarily - repeated for tt and tt2?
Thx