Problem with XML code

  • The xml code markup doesn't understand empty tags.

    This is perfectly valid xml.

    <Tag1 x=1 />

    but the markup drops the / at the end and adds a closing tag. Doesn't change the meaning of the xml, does cause confusion when you're showing someone what a peices of xml does or should look like

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Gail,

    I've been through this on a different thread as well. The html code itself is fine, it's just the way it's been displayed.

    If you need the original xml code to explain how your solution works you might need to add a note to your reply, that one who reads your reply should look at the xml code as it shows up when the "quote"-button is used.

    (see post/thread http://www.sqlservercentral.com/Forums/FindPost707572.aspx).

    Edit: I hope this is just an intermediate solution until the SSC programmers can find a way to fix it - if possible at all...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • I found that replacing the < and > with &lt; and &gt; removes the closing tags, but that's not fun to do.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Logged as a bug

  • Steve Jones - Editor (5/6/2009)


    Logged as a bug

    Thanks

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • We are supposed to get 1 dev/week a month, and we are looking to hire 1-2 devs to work on the sites (Simple Talk and here) regularly.

    Not sure where this will fall in the priority, but code formatting is something we went to work well.

  • I'd say this one's minor. It's an irritation. I only found it when posting pieces of a query's XML plan.

    Though do note that it happens in other code markups than XML, which can be a pain as I and some others use < and > to indicate a placeholder in code.

    As such:

    DBCC CHECKDB () WITH NO_INFOMSGS, ALL_ERRORMSGS

    That should have been

    DBCC CHECKDB (< Database Name > ) WITH NO_INFOMSGS, ALL_ERRORMSGS

    Code blocks other than XML shouldn't be trying to close tags at all.

    Hmmm, add another bug. Automatic adding of ="" on what's not intended as an xml attribute. This kind of 'validating' should only happen on code blocks with an xml-related description, not on SQL ones.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply