Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem with XML code Expand / Collapse
Author
Message
Posted Monday, May 4, 2009 2:33 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:32 AM
Points: 39,905, Visits: 36,245
The xml code markup doesn't understand empty tags.

This is perfectly valid xml.
<Tag1 x=1 />

<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 2008, MVP
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

Post #709738
Posted Tuesday, May 5, 2009 1:19 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:43 AM
Points: 6,826, Visits: 13,279
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
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #709949
Posted Tuesday, May 5, 2009 1:55 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:32 AM
Points: 39,905, Visits: 36,245
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 2008, MVP
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

Post #709965
Posted Wednesday, May 6, 2009 10:27 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 9:42 PM
Points: 31,036, Visits: 15,466
Logged as a bug






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #711274
Posted Wednesday, May 6, 2009 2:39 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:32 AM
Points: 39,905, Visits: 36,245
Steve Jones - Editor (5/6/2009)
Logged as a bug

Thanks



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #711568
Posted Wednesday, May 6, 2009 3:09 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 9:42 PM
Points: 31,036, Visits: 15,466
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.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #711613
Posted Wednesday, May 6, 2009 3:23 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:32 AM
Points: 39,905, Visits: 36,245
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 (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS

That should have been
DBCC CHECKDB (&lt; Database Name &gt; ) 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 2008, MVP
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

Post #711628
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse