Display XML

Discussion in 'ASP .Net' started by Steve Lutz, Dec 22, 2004.

  1. Steve Lutz

    Steve Lutz Guest

    I would like to display XML on my website, I want it to look/behave like an
    XML document looks when loaded into IE directly. I was hoping that I could
    find an XSL document somewhere on my computer that is the same one IE uses
    when displaying XML, but it doesn't look like there is one :-(

    I cannot just dump the XML to the browser, because there are other elements
    on the page.

    Does anyone know of an easy way to display XML data in a browser, with nice
    indentations between nodes, and maybe even the +/- controls that IE uses
    when displaying XML?


    Thanks in Advance

    Steve
     
    Steve Lutz, Dec 22, 2004
    #1
    1. Advertising

  2. just open the XML file then in the browser. I forget the code to do it but
    its pretty plain


    "Steve Lutz" wrote:

    > I would like to display XML on my website, I want it to look/behave like an
    > XML document looks when loaded into IE directly. I was hoping that I could
    > find an XSL document somewhere on my computer that is the same one IE uses
    > when displaying XML, but it doesn't look like there is one :-(
    >
    > I cannot just dump the XML to the browser, because there are other elements
    > on the page.
    >
    > Does anyone know of an easy way to display XML data in a browser, with nice
    > indentations between nodes, and maybe even the +/- controls that IE uses
    > when displaying XML?
    >
    >
    > Thanks in Advance
    >
    > Steve
    >
    >
    >
     
    =?Utf-8?B?TWlrZQ==?=, Dec 22, 2004
    #2
    1. Advertising

  3. Steve Lutz

    Hans Kesting Guest

    Steve Lutz wrote:
    > I would like to display XML on my website, I want it to look/behave
    > like an XML document looks when loaded into IE directly. I was
    > hoping that I could find an XSL document somewhere on my computer
    > that is the same one IE uses when displaying XML, but it doesn't look
    > like there is one :-(
    >
    > I cannot just dump the XML to the browser, because there are other
    > elements on the page.
    >
    > Does anyone know of an easy way to display XML data in a browser,
    > with nice indentations between nodes, and maybe even the +/- controls
    > that IE uses when displaying XML?
    >
    >
    > Thanks in Advance
    >
    > Steve


    You could put an iframe on the page, with the src pointing to the xml file.

    Hans Kesting
     
    Hans Kesting, Dec 22, 2004
    #3
  4. Steve Lutz

    Hans Kesting Guest

    Mike wrote:
    > just open the XML file then in the browser. I forget the code to do
    > it but its pretty plain
    >


    But what if you want to display that xml within a nice page? The automatic
    formatting only works if the entire document is one xml, not if it is part
    of a regular page.

    Hans Kesting
     
    Hans Kesting, Dec 22, 2004
    #4
  5. if you want the XML to look "prett" then use XSLT, but this he said he
    wanted it to look/behave like an
    XML document looks when loaded into IE directly

    "Hans Kesting" wrote:

    > Mike wrote:
    > > just open the XML file then in the browser. I forget the code to do
    > > it but its pretty plain
    > >

    >
    > But what if you want to display that xml within a nice page? The automatic
    > formatting only works if the entire document is one xml, not if it is part
    > of a regular page.
    >
    > Hans Kesting
    >
    >
    >
    >
     
    =?Utf-8?B?TWlrZQ==?=, Dec 22, 2004
    #5
  6. Steve Lutz

    Alex Homer Guest

    Use an <asp:xml> control, and surround it with <pre> tags?

    "Steve Lutz" <> wrote in message
    news:...
    > I would like to display XML on my website, I want it to look/behave like

    an
    > XML document looks when loaded into IE directly. I was hoping that I

    could
    > find an XSL document somewhere on my computer that is the same one IE uses
    > when displaying XML, but it doesn't look like there is one :-(
    >
    > I cannot just dump the XML to the browser, because there are other

    elements
    > on the page.
    >
    > Does anyone know of an easy way to display XML data in a browser, with

    nice
    > indentations between nodes, and maybe even the +/- controls that IE uses
    > when displaying XML?
    >
    >
    > Thanks in Advance
    >
    > Steve
    >
    >
     
    Alex Homer, Dec 22, 2004
    #6
  7. Steve Lutz

    Steve Lutz Guest

    Mike and Hans

    The page has other HTML elements in it, in addition to the XML. That is why
    I cannot just dump the XML to the browser as an XML file. Plus, firefox for
    example does not display the XML as nicely as IE does. I don't want to write
    up an entire XSL for this, I was hoping someone knew the XSL files that IE
    uses.
    Since the XML I'm outputting is debugging information, I didn't want to put
    a lot of time into it either, but the QA folks would sure appreciate the IE
    style raw XML display/interaction instead of trying to look through a string
    of unformatted XML.






    "Mike" <> wrote in message
    news:...
    > if you want the XML to look "prett" then use XSLT, but this he said he
    > wanted it to look/behave like an
    > XML document looks when loaded into IE directly
    >
    > "Hans Kesting" wrote:
    >
    > > Mike wrote:
    > > > just open the XML file then in the browser. I forget the code to do
    > > > it but its pretty plain
    > > >

    > >
    > > But what if you want to display that xml within a nice page? The

    automatic
    > > formatting only works if the entire document is one xml, not if it is

    part
    > > of a regular page.
    > >
    > > Hans Kesting
    > >
    > >
    > >
    > >
     
    Steve Lutz, Dec 23, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Imran Aziz
    Replies:
    4
    Views:
    1,515
    Imran Aziz
    Aug 11, 2005
  2. Marc Twain

    Display and display model

    Marc Twain, Jan 13, 2004, in forum: Java
    Replies:
    1
    Views:
    382
    Matt Humphrey
    Jan 13, 2004
  3. blank101
    Replies:
    2
    Views:
    536
    blank101
    Feb 5, 2005
  4. sed_y
    Replies:
    0
    Views:
    1,025
    sed_y
    Feb 15, 2012
  5. Erik Wasser
    Replies:
    5
    Views:
    465
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page