Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on XML

Status
Not open for further replies.

NickMalloy

Programmer
Apr 15, 2005
68
US
I am thinking about creating a website completely through XML and XSL. I am using MSSQL for my database and would be creating the XML document through ASP.NET. My question is that some of my database content contains HTML such as image tags and such. Is there anything I have to worry about when it comes to bringing the html stored in the database to XML?
 
EVERYTHING has to have an end tag...
Such As:
<br>
should be:
<br/>
And:
<img src="x.gif">
should be:
<img src="x.gif"/>
etc...

Html tends to let you get a little sloppy, but XML has NO Tolerance...

HTML will typically go into the XSL files...

you can summerize the page in the XML and XSL can convert it to HTML...

Such as... This XML:
Code:
<Picture>
  <URL>test.jpg</URL>
  <Link>somewhere.html</Link>
  <Alt>Error Loading Pic</Alt>
</Picture>

Could be displayed through XSL such as...
Code:
...
  <xsl:template match="Picture">
    <a href="[b]{Link}[/b]"><img src="[b]{URL}[/b]" alt="[b]{Alt}[/b]" /></a>
  </xsl:template>
...

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top