ASP format of received xml

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?YW9pZmV5MTIzNA==?=

    ASP format of received xml

    I have a client who is using an asp page to receive xml files from my company.
    When the client views the xml through a browser it is formatted correctly
    i.e. indented properly etc.
    However, the client also uses wordpad to view the xml and when using wordpad
    the xml appears on one line.
    Is it possible to change the settings of the asp page so that it formats the
    xml correctly?
    Thanks in advance
  • Anthony Jones

    #2
    Re: ASP format of received xml

    "aoifey1234 " <aoifey1234@dis cussions.micros oft.comwrote in message
    news:1E3224CA-8018-43FD-8465-096B4B698150@mi crosoft.com...
    >I have a client who is using an asp page to receive xml files from my
    >company.
    When the client views the xml through a browser it is formatted correctly
    i.e. indented properly etc.
    However, the client also uses wordpad to view the xml and when using
    wordpad
    the xml appears on one line.
    Is it possible to change the settings of the asp page so that it formats
    the
    xml correctly?
    It is but don't. Ask them why they want to read the XML file in Wordpad.

    If they must open the XML file in some form of editor. Get them to use some
    free editor that understands and can format XML.
    For example Microsofts Web Developer Express.



    --
    Anthony Jones - MVP ASP/ASP.NET

    Comment

    • =?Utf-8?B?YW9pZmV5MTIzNA==?=

      #3
      Re: ASP format of received xml

      Thank you for the response. Unfortunately they are not open to the idea of
      changing which editor they use. The xml files used to be sent to a third
      party who also used an asp page to receive the xml. They then forwarded the
      xml file to my client. We have now cut out the third party and we are sending
      directly to the client.
      Since this changeover the xml no longer displays correctly through wordpad.
      We have investigated all matters on this side and the only other possible
      solution is the asp settings on their side.
      I don't have much knowledge in this area. It may not be the most advisable
      solution but could someone please explain how to change the settings of the
      asp page so that it formats the xml correctly?
      Many thanks.


      "Anthony Jones" wrote:
      "aoifey1234 " <aoifey1234@dis cussions.micros oft.comwrote in message
      news:1E3224CA-8018-43FD-8465-096B4B698150@mi crosoft.com...
      I have a client who is using an asp page to receive xml files from my
      company.
      When the client views the xml through a browser it is formatted correctly
      i.e. indented properly etc.
      However, the client also uses wordpad to view the xml and when using
      wordpad
      the xml appears on one line.
      Is it possible to change the settings of the asp page so that it formats
      the
      xml correctly?
      >
      It is but don't. Ask them why they want to read the XML file in Wordpad.
      >
      If they must open the XML file in some form of editor. Get them to use some
      free editor that understands and can format XML.
      For example Microsofts Web Developer Express.
      >
      >
      >
      --
      Anthony Jones - MVP ASP/ASP.NET
      >
      >

      Comment

      • Anthony Jones

        #4
        Re: ASP format of received xml

        "aoifey1234 " <aoifey1234@dis cussions.micros oft.comwrote in message
        news:B7F178D0-3D72-4090-8296-EB4B2D9B291F@mi crosoft.com...
        Thank you for the response. Unfortunately they are not open to the idea of
        changing which editor they use. The xml files used to be sent to a third
        party who also used an asp page to receive the xml. They then forwarded
        the
        xml file to my client. We have now cut out the third party and we are
        sending
        directly to the client.
        Since this changeover the xml no longer displays correctly through
        wordpad.
        We have investigated all matters on this side and the only other possible
        solution is the asp settings on their side.
        I don't have much knowledge in this area. It may not be the most advisable
        solution but could someone please explain how to change the settings of
        the
        asp page so that it formats the xml correctly?
        Many thanks.
        >
        You can't change any settings. You need to change the way the XML is built
        to include the appropriate CR, LF and tab character sequences to create a
        formatted XML file that will be displayed as they expect in WordPad. If you
        want some help with that you're going to need to post a snippet of the code
        you are using to build the XML currently.

        I'm surprised by the number of times I come across immovable requirements
        because the 'customer/boss demands it' that are just plain dumb. Have you
        asked them why they _must_ be able to view the file in WordPad? What was
        their answer? I suspect they are making something harder work than it needs
        be. You could redirect your efforts in giving them a solution to that and
        thereby scoring some browny points whilst at the same time avoiding doing
        something dumb.

        --
        Anthony Jones - MVP ASP/ASP.NET

        Comment

        • =?Utf-8?B?YW9pZmV5MTIzNA==?=

          #5
          Re: ASP format of received xml

          I presumed this was a forum to ask for ASP advice and not advice on how to
          deal with the client. The fact is that before the changeover the client could
          view the xml how they wanted and now they cannot. Instead of, in my opinion,
          passing the book with a simple "well, maybe you should use another editor", I
          feel that the better option is to come up with a solution.
          We have managed a workaround which we are intending to use, so the client is
          happy.
          "They _must_ be able" to view the file in wordpad as they are simply looking
          at the files on a server with no other editor available to them.
          Thanks for the additional advice, however I would have preferred an actual
          answer to my question which unfortunately I did not get.
          To use your own words......."I' m surprised by the number of times I come
          across people" who waste time and resources answering a thread in which they
          have provided no answer.
          I am disappointed to be honest. I came to this forum to ask for ASP advice
          and instead I feel that I am being criticised for trying to keep the client
          happy. PLEASE!
          Thanks again for the ...ahem.... advice :)

          "Anthony Jones" wrote:
          "aoifey1234 " <aoifey1234@dis cussions.micros oft.comwrote in message
          news:B7F178D0-3D72-4090-8296-EB4B2D9B291F@mi crosoft.com...
          Thank you for the response. Unfortunately they are not open to the idea of
          changing which editor they use. The xml files used to be sent to a third
          party who also used an asp page to receive the xml. They then forwarded
          the
          xml file to my client. We have now cut out the third party and we are
          sending
          directly to the client.
          Since this changeover the xml no longer displays correctly through
          wordpad.
          We have investigated all matters on this side and the only other possible
          solution is the asp settings on their side.
          I don't have much knowledge in this area. It may not be the most advisable
          solution but could someone please explain how to change the settings of
          the
          asp page so that it formats the xml correctly?
          Many thanks.
          >
          You can't change any settings. You need to change the way the XML is built
          to include the appropriate CR, LF and tab character sequences to create a
          formatted XML file that will be displayed as they expect in WordPad. If you
          want some help with that you're going to need to post a snippet of the code
          you are using to build the XML currently.
          >
          I'm surprised by the number of times I come across immovable requirements
          because the 'customer/boss demands it' that are just plain dumb. Have you
          asked them why they _must_ be able to view the file in WordPad? What was
          their answer? I suspect they are making something harder work than it needs
          be. You could redirect your efforts in giving them a solution to that and
          thereby scoring some browny points whilst at the same time avoiding doing
          something dumb.
          >
          --
          Anthony Jones - MVP ASP/ASP.NET
          >
          >

          Comment

          • Evertjan.

            #6
            Re: ASP format of received xml

            =?Utf-8?B?YW9pZmV5MTI zNA==?= wrote on 09 sep 2008 in
            microsoft.publi c.inetserver.as p.general:
            >"What people who free-of-charge choose to offer as advice is their own
            >business."
            [please quote the poster's name on Usenet, it was "Anthony Jones"]
            I can argue that what clients request of the people on their pay roll
            is their business. If I wanted advice on how to deal with the client,
            I would go to a more suitable site.
            This is Usenet, not a "site".

            You certainly can argue, but on Usenet, what you want is not necessarily
            what you get.

            Anthony gave you very usefull advice, which seemingly is not what you
            wanted.

            And even if his response were not useful,
            that would be his prerogative.

            On Usenet, what you want as an OP
            does not give you any right to expect to get.

            So please, anonimous, go search for a paid helpdesk that will be in your
            employ and will serve you the [probably wrong] answers you want to receive.

            --
            Evertjan.
            The Netherlands.
            (Please change the x'es to dots in my emailaddress)

            Comment

            • Dooza

              #7
              Re: ASP format of received xml

              Evertjan. wrote:
              =?Utf-8?B?YW9pZmV5MTI zNA==?= wrote on 09 sep 2008 in
              microsoft.publi c.inetserver.as p.general:
              >
              >>"What people who free-of-charge choose to offer as advice is their own
              >>business."
              >
              [please quote the poster's name on Usenet, it was "Anthony Jones"]
              >
              >I can argue that what clients request of the people on their pay roll
              >is their business. If I wanted advice on how to deal with the client,
              >I would go to a more suitable site.
              >
              This is Usenet, not a "site".
              I get the impression he is posting from a website and does not know that
              it is just a front end to a usenet newsgroup.

              Dooza

              Comment

              • =?Utf-8?B?T2xkIFBlZGFudA==?=

                #8
                Re: ASP format of received xml


                "aoifey1234 " wrote:

                .... a bunch of irrelevant stuff ...

                *********

                Applause to Anthony and Evertjan. 100% agreement.

                And also agreement with Anthony re "daft behavior." If you don't try to
                educate your clients then _you_ aren't doing _your_ job. If a client fires
                me because I gave him good advice, then I'm happy. With any luck, that
                client will not too eventually go out of business. Luddites deserve their
                own ends.


                Comment

                • Daniel Crichton

                  #9
                  Re: ASP format of received xml

                  aoifey1234 wrote on Tue, 9 Sep 2008 08:11:02 -0700:
                  I presumed this was a forum to ask for ASP advice and not advice on how
                  to deal with the client. The fact is that before the changeover the
                  client could view the xml how they wanted and now they cannot. Instead
                  of, in my opinion, passing the book with a simple "well, maybe you
                  should use another editor", I feel that the better option is to come
                  up with a solution.
                  Did you even read Anthony's post fully? The first part of his reply told you
                  exactly what needs to be done to the XML file (add CR LF where the line
                  needs to be broken), and he asked you to post the ASP code so that he could
                  point you to exactly where that could be added. But you ignored that and
                  instead decided to rant about the second part, which in this case is
                  actually good advice - XML is not supposed to be read with a plain text
                  editor, it needs to be read with something that can parse the markup.
                  We have managed a workaround which we are intending to use, so the
                  client is happy.
                  "They _must_ be able" to view the file in wordpad as they are simply
                  looking at the files on a server with no other editor available to
                  them.
                  If they have Wordpad, they have Windows - which means they also have
                  Internet Explorer, and that can parse XML files into a much more readable
                  format.
                  Thanks for the additional advice, however I would have preferred an
                  actual answer to my question which unfortunately I did not get.
                  But you did get an answer - you just ignored it.
                  To use your own words......."I' m surprised by the number of times I
                  come across people" who waste time and resources answering a thread in
                  which they have provided no answer.
                  And again, he did provide an answer.
                  I am disappointed to be honest. I came to this forum to ask for ASP
                  advice and instead I feel that I am being criticised for trying to
                  keep the client happy. PLEASE!
                  Thanks again for the ...ahem.... advice :)
                  You should feel lucky that anyone took the time to point out what you needed
                  to do considering that you haven't provided a single piece of example ASP
                  code so that we can see how the XML is being created - without knowing that,
                  how can anyone tell you exactly what you should do?

                  --
                  Dan

                  "Anthony Jones" wrote:
                  >"aoifey1234 " <aoifey1234@dis cussions.micros oft.comwrote in message
                  >news:B7F178D 0-3D72-4090-8296-EB4B2D9B291F@mi crosoft.com...
                  >>Thank you for the response. Unfortunately they are not open to the
                  >>idea of changing which editor they use. The xml files used to be
                  >>sent to a third party who also used an asp page to receive the xml.
                  >>They then forwarded the xml file to my client. We have now cut out
                  >>the third party and we are sending directly to the client.
                  >>Since this changeover the xml no longer displays correctly through
                  >>wordpad.
                  >>We have investigated all matters on this side and the only other
                  >>possible solution is the asp settings on their side.
                  >>I don't have much knowledge in this area. It may not be the most
                  >>advisable solution but could someone please explain how to change
                  >>the settings of the asp page so that it formats the xml correctly?
                  >>Many thanks.
                  >You can't change any settings. You need to change the way the XML is
                  >built to include the appropriate CR, LF and tab character sequences
                  >to create a formatted XML file that will be displayed as they expect
                  >in WordPad. If you want some help with that you're going to need to
                  >post a snippet of the code you are using to build the XML currently.
                  >I'm surprised by the number of times I come across immovable
                  >requirements because the 'customer/boss demands it' that are just
                  >plain dumb. Have you asked them why they _must_ be able to view the
                  >file in WordPad? What was their answer? I suspect they are making
                  >something harder work than it needs be. You could redirect your
                  >efforts in giving them a solution to that and thereby scoring some
                  >browny points whilst at the same time avoiding doing something dumb.
                  >--
                  >Anthony Jones - MVP ASP/ASP.NET

                  Comment

                  • Phillip Windell

                    #10
                    Re: ASP format of received xml


                    "aoifey1234 " <aoifey1234@dis cussions.micros oft.comwrote in message
                    news:4EA8ECED-E197-452F-9A20-EDF408E34575@mi crosoft.com...

                    You seem to be missing an important point from the beginning (and so is the
                    client).
                    The browser displays the XML the way you see it displayed because the
                    browser is **interpreting* * the XML,..it is not simply viewing the file
                    contents. Notepad on the other hand is doing nothing more than viewing the
                    contents of the text based text file.

                    An XML file is *not* a special type of file,...the only thing that *makes*
                    it an XML file is the *content*,...no t the format,...for the XML to "look"
                    like XML as you see it in the browser is has to be interpreted which is what
                    the browser is doing,...Notepa d does not interpret anything.

                    --
                    Phillip Windell


                    The views expressed, are my own and not those of my employer, or Microsoft,
                    or anyone else associated with me, including my cats.
                    -----------------------------------------------------


                    Comment

                    • Phillip Windell

                      #11
                      Re: ASP format of received xml


                      "aoifey1234 " <aoifey1234@dis cussions.micros oft.comwrote in message
                      news:4EA8ECED-E197-452F-9A20-EDF408E34575@mi crosoft.com...
                      I can argue that what clients request of the people on their pay roll is
                      their business. If I wanted advice on how to deal with the client, I would
                      go
                      to a more suitable site. I had already stated that "Unfortunat ely they are
                      not open to the idea of changing which editor they use"
                      Then they need to change what they are "open" to doing,...**that is** the
                      solution. And it is your job to get the client to understand that.
                      I thought that the fact that I was ASKING for a solution may have
                      indicated
                      that I was LOOKING for a solution???
                      There,....is... .....no.......s olution in the "way" you want there to be a
                      solution.
                      Your solution is to educate the Client to do things the correct way,..and to
                      approach things in the correct way,...and to desire things in the correct
                      way,...so that they get the correct results.


                      --
                      Phillip Windell


                      The views expressed, are my own and not those of my employer, or Microsoft,
                      or anyone else associated with me, including my cats.
                      -----------------------------------------------------


                      Comment

                      • =?Utf-8?B?T2xkIFBlZGFudA==?=

                        #12
                        Re: ASP format of received xml

                        "Phillip Windell" wrote:
                        There,....is... .....no.......s olution in the "way" you want there to be a
                        solution.
                        Your solution is to educate the Client to do things the correct way,..and to
                        approach things in the correct way,...and to desire things in the correct
                        way,...so that they get the correct results.
                        As I'm sure you are aware, I 100% agree with your second paragraph.

                        However...your first paragraph isn't stricly true.

                        If the idiotic clients want to stupidly use wordpad to view the XML *text*
                        (and yes, I agree, it is only text) and they WANT line breaks between tags
                        and indentation...w ell, yes, you *can* produce an XML file that is formatted
                        in that fashion. And, indeed, I have done so on occasion just out of a sense
                        of neatness. It's not hard.

                        But it's also true that the standard tools aren't going to do that kind of
                        crappy stuff for you. Why should they? They don't care about line breaks and
                        indentations and neither should and XML processor.

                        Still, it *is* possible to create a solution to his so-called "problem".
                        Even if it is a problem that only exists in the minds of doofi. *

                        ***********

                        * doofi: Plural form of doofus.


                        Comment

                        • Phillip Windell

                          #13
                          Re: ASP format of received xml

                          "Old Pedant" <OldPedant@disc ussions.microso ft.comwrote in message
                          news:52529DD5-1B58-45EE-976E-27333B1E915C@mi crosoft.com...
                          "Phillip Windell" wrote:
                          >
                          >There,....is.. ......no....... solution in the "way" you want there to be a
                          >solution.
                          >Your solution is to educate the Client to do things the correct way,..and
                          >to
                          >approach things in the correct way,...and to desire things in the correct
                          >way,...so that they get the correct results.
                          >
                          As I'm sure you are aware, I 100% agree with your second paragraph.
                          >
                          However...your first paragraph isn't stricly true.
                          Yea, I know what you mean. I was just trying hard to make a point. I
                          normally haunt the networking groups or ISA server groups and I get really
                          frustrated by people who come up with some wierd convoluted twisted ways to
                          slap something together and then expect me/us to tell them how to "make it
                          work". Then when you explain the correct way to do they say they "have" to
                          do it the way they are doing it because someone "told" them too. I think a
                          lot of times they are just lazy and don't want to undo the previous bad work
                          or spend a few dollars to buy the right equipment. Anyway I don't think
                          there is an excuse to do something the "wrong way" just because someone told
                          you to,...or at least not without reasonable effort devoted to arguing in
                          favor of doing it the correct way. So even though I'm not a developer (but
                          find the group interesting to read through post's answers) I just couldn't
                          bring myself to pass up that post :-)

                          --
                          Phillip Windell


                          The views expressed, are my own and not those of my employer, or Microsoft,
                          or anyone else associated with me, including my cats.
                          -----------------------------------------------------


                          Comment

                          Working...