From: MarinaEe on
I have a client who has given me this sample, I am suppose to use XMLPort to
produce this. Now I have 2 problems.

1. Attribute = "Y"
There are attribute = "Y" after each element. How can I produce this? Am
I suppose to make attribute for each elements?

2. <![CDATA[ AR ]]>
All data values must be encased in a cdata section. How can I produce
this with XMLPort? Any coding required?



Sample:
- <CR_DOC_HDR AMSDataObject="Y">
- <DOC_CAT Attribute="Y">
- <![CDATA[ AR ]]>
</DOC_CAT>
- <DOC_TYP Attribute="Y">
- <![CDATA[ CR ]]>
</DOC_TYP>
- <DOC_CD Attribute="Y">
- <![CDATA[ CR ]]>
</DOC_CD>
- <DOC_DEPT_CD Attribute="Y">
- <![CDATA[ 100 ]]>
</DOC_DEPT_CD>
- <DOC_UNIT_CD Attribute="Y">
- <![CDATA[ null ]]>
</DOC_UNIT_CD>



From: UseUse on
On 2006-05-24 20:52:02 +0200, MarinaEe
<MarinaEe(a)discussions.microsoft.com> said:

> I have a client who has given me this sample, I am suppose to use
> XMLPort to produce this. Now I have 2 problems.
>
> 1. Attribute = "Y"
> There are attribute = "Y" after each element. How can I produce
> this? Am I suppose to make attribute for each elements?
>
> 2. <![CDATA[ AR ]]>
> All data values must be encased in a cdata section. How can I
> produce this with XMLPort? Any coding required?
>
>
>
> Sample:
> - <CR_DOC_HDR AMSDataObject="Y">
> - <DOC_CAT Attribute="Y">
> - <![CDATA[ AR ]]> </DOC_CAT>
> - <DOC_TYP Attribute="Y">
> - <![CDATA[ CR ]]> </DOC_TYP>
> - <DOC_CD Attribute="Y">
> - <![CDATA[ CR ]]> </DOC_CD>
> - <DOC_DEPT_CD Attribute="Y">
> - <![CDATA[ 100 ]]> </DOC_DEPT_CD>
> - <DOC_UNIT_CD Attribute="Y">
> - <![CDATA[ null ]]> </DOC_UNIT_CD>

CDATA and namespaces are not supported by XMLPorts.
Solution: develop your own Navision C/Side Code (codunit) with a xml
encoder/decoder.


From: BlackTiger on
check this:
http://www.mibuso.com/forum/viewtopic.php?t=12231

trying to find something to deal with CDATA...

But easiest way - to create XML manually (it's still just a text file!).


"UseUse" wrote:

> On 2006-05-24 20:52:02 +0200, MarinaEe
> <MarinaEe(a)discussions.microsoft.com> said:
>
> > I have a client who has given me this sample, I am suppose to use
> > XMLPort to produce this. Now I have 2 problems.
> >
> > 1. Attribute = "Y"
> > There are attribute = "Y" after each element. How can I produce
> > this? Am I suppose to make attribute for each elements?
> >
> > 2. <![CDATA[ AR ]]>
> > All data values must be encased in a cdata section. How can I
> > produce this with XMLPort? Any coding required?
> >
> >
> >
> > Sample:
> > - <CR_DOC_HDR AMSDataObject="Y">
> > - <DOC_CAT Attribute="Y">
> > - <![CDATA[ AR ]]> </DOC_CAT>
> > - <DOC_TYP Attribute="Y">
> > - <![CDATA[ CR ]]> </DOC_TYP>
> > - <DOC_CD Attribute="Y">
> > - <![CDATA[ CR ]]> </DOC_CD>
> > - <DOC_DEPT_CD Attribute="Y">
> > - <![CDATA[ 100 ]]> </DOC_DEPT_CD>
> > - <DOC_UNIT_CD Attribute="Y">
> > - <![CDATA[ null ]]> </DOC_UNIT_CD>
>
> CDATA and namespaces are not supported by XMLPorts.
> Solution: develop your own Navision C/Side Code (codunit) with a xml
> encoder/decoder.
>
>
>
From: BlackTiger on
No, it's impossible to create "CDATA" section :(

XMLPort is quite limited feature.



"BlackTiger" wrote:

> check this:
> http://www.mibuso.com/forum/viewtopic.php?t=12231
>
> trying to find something to deal with CDATA...
>
> But easiest way - to create XML manually (it's still just a text file!).
>
>
> "UseUse" wrote:
>
> > On 2006-05-24 20:52:02 +0200, MarinaEe
> > <MarinaEe(a)discussions.microsoft.com> said:
> >
> > > I have a client who has given me this sample, I am suppose to use
> > > XMLPort to produce this. Now I have 2 problems.
> > >
> > > 1. Attribute = "Y"
> > > There are attribute = "Y" after each element. How can I produce
> > > this? Am I suppose to make attribute for each elements?
> > >
> > > 2. <![CDATA[ AR ]]>
> > > All data values must be encased in a cdata section. How can I
> > > produce this with XMLPort? Any coding required?
> > >
> > >
> > >
> > > Sample:
> > > - <CR_DOC_HDR AMSDataObject="Y">
> > > - <DOC_CAT Attribute="Y">
> > > - <![CDATA[ AR ]]> </DOC_CAT>
> > > - <DOC_TYP Attribute="Y">
> > > - <![CDATA[ CR ]]> </DOC_TYP>
> > > - <DOC_CD Attribute="Y">
> > > - <![CDATA[ CR ]]> </DOC_CD>
> > > - <DOC_DEPT_CD Attribute="Y">
> > > - <![CDATA[ 100 ]]> </DOC_DEPT_CD>
> > > - <DOC_UNIT_CD Attribute="Y">
> > > - <![CDATA[ null ]]> </DOC_UNIT_CD>
> >
> > CDATA and namespaces are not supported by XMLPorts.
> > Solution: develop your own Navision C/Side Code (codunit) with a xml
> > encoder/decoder.
> >
> >
> >