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 ?
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.
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> ....
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.
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.
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.
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.
Comments
<?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> ....
It should be posted somewhere on the forum how to do that.
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
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.
RIS Plus, LLC
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.