XML Ports an beginning Blanks

garakgarak Member Posts: 3,263
Hy,

is it allowed (corresponding XML defination) to starts an XML element with blanks?

Like:
<record>
  <ds>
    <field1>        8 Blanks before</field>
  </ds>
</record>

The Browser shows
<record>
  <ds>
    <field1>8 Blanks before</field>
  </ds>
</record>

But when i say "see source code" (kontextmenu) the blanks exist.

Navision dowsent import the blanks, Why :?:

Regards
Do you make it right, it works too!

Comments

  • jhoekjhoek Member Posts: 216
    Have you tried putting the element's value in a CDATA section?
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • garakgarak Member Posts: 3,263
    I will import the datas in a Table. An test dataport that i used import the blnks but not the XMLPort.

    The Format/Evaluate of the xmlport is <C/SIDE Format/Evaluate>. Also "XML Format/Evaluate" doesn't work. :( Any idea :?: I', need this blanks.

    Now i have a workarround with code, buth this is not so fine.

    Regards
    Do you make it right, it works too!
  • DenSterDenSter Member Posts: 8,307
    Try puting the value into a text variable and then assign it to the field.
  • garakgarak Member Posts: 3,263
    I 've sampled this at first. The same problem. The only idea i have, is an another XMLelement that say how many chars the TextElement has and then set the different value of chars as blanks at first.

    Like:
    The org Value is (Source):
    " MY TEXT WITH BLANKS BEFORE "
    Len = 35

    XMLelements:
    <Inhalt>MY TEXT WITH BLANKS BEFORE</Inhalt>
    <AnzZeichen>35</AnzZeichen>

    The XML Import make
    Inhalt = "MY TEXT WITH BLANKS BEFORE "
    InhaltLen = 29

    Here i make an loop to fill the missed Blanks. But this is inly an workarroud. The question is: Why the XMLPort loose the Blanks?

    Regards
    Do you make it right, it works too!
Sign In or Register to comment.