XML Export &

Maik_SwissMaik_Swiss Member Posts: 17
Hi everybody.


I have a small problem. When exporting a xml file & is shown as &

I know this is XML-format but for the import to the other solution i need the & only.


Any help out there?

thx in advanced

Maik

Comments

  • MBergerMBerger Member Posts: 413
    The ampersand is an illegal character in an XML file and should always be converted to &
    So the program you are importing in is the problem here.
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Yeah, I think it's a bug in your import solution, because it doesn't deal right with XML format.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • Maik_SwissMaik_Swiss Member Posts: 17
    the problem is, i have no chance to alter the import solution.

    So i need a way to export without amp; from Navision.


    Current solution is to rename the & to & with a text editor, but thats not a good solution.


    Any other idea`s?
  • ta5ta5 Member Posts: 1,164
    Hello
    Imo it is correct to export as & because & is a special character for xml. The importing solution should be able to deal with it because it is xml standard.
    Regards
    Thomas
  • Maik_SwissMaik_Swiss Member Posts: 17
    I try to explain some more.


    NAV exports a & with amp; thats ok when you need it as text.

    I have the problem that we need the & as Line break.

    Example what i need:

    <ORDER_SUPPLEMENT ORDER_ID="12-345678" ID="AA1" VALUE="1, Test Fahrzeug Test Lastwagen 4 x 4 3261 - Text Text Text Text Text Text Text Text!" CLIENT_MUST_FILL="0"/>

    the red part is the line break code.

    and this is what NAV exports:

    <ORDER_SUPPLEMENT ORDER_ID="12-345678" ID="AA1" VALUE="1, Test Fahrzeug Test Lastwagen 4 x 4&#xD;&#xA;3261 - Text Text Text Text &#xD;&#xA;Text Text Text Text!" CLIENT_MUST_FILL="0"/>


    Regards
    Maik
  • ta5ta5 Member Posts: 1,164
    Hm, can you use another character for the line break? Or do you have the possibility to change the xml structure to have all lines in their own element?
    Thomas
  • Maik_SwissMaik_Swiss Member Posts: 17
    i cant alter the import code - so no chance to take another character for the line break


    all lines in an own element didnt work, because i need to fill one field (ID-AA1)
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    As far as I can see this part
    VALUE="1, Test Fahrzeug Test Lastwagen 4 x 4&#xD;&#xA;3261 - Text Text Text Text &#xD;&#xA;Text Text Text Text!"
    
    is a normal XML attribute. I don't understand why an ampersand should be the character for a line break. It is XML standard that ampersand is substituted by &. So, I would contact the provider of your import solution and tell him that there's a bug. Otherwise he shouldn't use "pseudo" XML format for his interface.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.