linebreak in xml files

belzebupkebelzebupke Member Posts: 4
hi everybody,

I'm trying to write xml files, when I view them in Internet Explorer, everything looks ok. When I view them in Notepad everything is in one line. How can I let Notepad looks the same as IE ?

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Why do you want this? It is normal for an xml file to be like this.
  • belzebupkebelzebupke Member Posts: 4
    we work together with a company and they told us that they couldn't import them if they don't look like this. there are several other company's who have to send the xml files, but we are the only one with navision.
  • MalajloMalajlo Member Posts: 294
    Did you try to open file in WordPad (or Word)?
  • belzebupkebelzebupke Member Posts: 4
    yes, I've tried, but the same. I always become this :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <FAHR_DATA><FAHRT><FAR><FAR_FAHR/><FAR_TSBE/><FAR_TSEN/><FADA><FAR_FANR/><FAR_TANA/><FAR_FAID>91515</FAR_FAID><FAR_AGID>91518</FAR_AGID></FADA> ....
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You have to open the file after is has been created by the xmlport and add cariage retun linefeed after each >.

    It should be posted somewhere on the forum how to do that.
  • ta5ta5 Member Posts: 1,164
    Maybe a silly question :)

    Are you really sure, they really need the linebreaks for processing? Linebreak is not part of the xml definition and normally the xmlfiles are not parsed as a textfile but loaded into the DOM (document object model) from where the parsing happens with methods, e.g. SelectSingle, etc.

    Regards
    Thomas
  • DenSterDenSter Member Posts: 8,304
    While linebreaks are not part of the standard, and they are strictly speaking not necessary to have wellformed XML, some developers at some software companies have interpreted it that way, and made their parsers work only if they are present.

    Sometimes you just have to work with the company you are trying to communicate with and format something in a specific way, even if it doesn't conform. I would certainly try to get the other guy to conform, but I'd rather send my time making the software work than argue about adhering to standards. :mrgreen:
  • ta5ta5 Member Posts: 1,164
    DenSter wrote:
    Sometimes you just have to work with the company you are trying to communicate with and format something in a specific way, even if it doesn't conform. I would certainly try to get the other guy to conform, but I'd rather send my time making the software work than argue about adhering to standards. :mrgreen:

    I fully agree with you, but sometimes you get some wrong information in the first time. After asking again and explaining the problem the answer is sometimes less stringent. At least this is my personal experience.
    :)
Sign In or Register to comment.