I have encountered a lot of problems, I used to learn to XSL, this name space: Private Void Createxml () ... {SQLCOMMAND CM = New SQLCOMMAND (); String Strinfo = ""; try ... {cm.connection = myconnection; sqldatarader DR; sbxml = new stringbuilder (); sbxml.append (" } Else ... {cm.commandtext = "select * from personalweb where isdefault = 1";} cm.commandtype = commandType.text; cm.connection = myconnection; dr = cm.executeRectioner (); if (! Dr.hasRows ) ... {Dr.close (); throw new argumentException ("Personal home page template error!");} Dr.read (); strinfo = DR ["tmpname"] == null? ": DR [" TMPNAME "] .Tostring (); if (str.close (); throw new argumentException (" Personal Home Template Error! ");} SBXML.Append (" Throw new argumentException ("Load user information is wrong!");} Dr.read (); strinfo = DR ["stature"] == NULL? ": DR [" stature "]. Tostring (); strinfo = (Strinfo == "" | | Strinfo == "0")? "Not announced": Strinfo "cm"; addoneElement ("height", strinfo, "stature"); strinfo = DR ["avoirdupois"] == NULL? "": DR ["avoirdupois"]. TOSTRING (); strinfo = (strinfo == "|| Strinfo ==" 0 ")?" Not announced ": Strinfo " kg "; addoneElement (" Weight " Strinfo, "avoirdupois"); strinfo = DR ["bloodType"] == null? "": DR ["bloodType"]. toString (); strinfo = (strinfo == "" | | Strinfo == "0" )? "Not announced": STRINFO "type"; AddOndElement ("blood type", strinfo, "bloodtype"); strinfo = DR ["vocation"] == null? "": DR ["vocation"]. Tostring ); Strinfo = (Strinfo == "|| Strinfo ==" 0 ")?" Unpublished ": Strinfo; AddoneElement (" Engaged in Industry ", Strinfo," Vocation "); Strinfo = DR [" marry "] = = NULL? "": DR ["marry"]. toString (); strinfo = (STR INFO == "" | Strinfo == "0")? "Unpublished": STRINFO; AddOndelement ("Marriage Status", Strinfo, "Marry"); Strinfo = DR ["Title"] == NULL? "" : DR ["Title"]. TOSTRING (); Strinfo = (Strinfo == "|| Strinfo ==" 0 ")?" Unpublished ": Strinfo; AddOndelement (" Professional Title ", Strinfo," Title "); Strinfo = DR [" income "] == NULL ? "": DR ["income"]. TOSTRING (); strinfo = (Strinfo == "|| Strinfo ==" 0 ")?" Unpublished ": Strinfo; AddoneElement (" income level ", strinfo," INCOME "); STRINFO = DR [" Schoolage "] == NULL?": DR ["School"]. TOSTRING (); strinfo = (strinfo == "|| Strinfo ==" 0 ")?" Announced: Strinfo; AddoneElement ("Society", Strinfo, "Schoolage"); STRINFO = DR ["smoke"] == null? ": DR [" smoke "]. Tostring (); strinfo = (Strinfo = (Strinfo = == "" || Strinfo == "0")? "Unpublished": strinfo; addoneElement ("Do you smoke?", Strinfo, "smoke"); strinfo = DR ["drink"] == null? "" : DR ["Drink"]. TOSTRING (); strinfo = (Strinfo == "| | Strinfo ==" 0 ")?" Unpublished ": strinfo; addoneElement (" Will drink? ", Strinfo," Drink " ); Strinfo = DR ["AIM"] == NULL? "": DR ["AIM"]. TOSTRING (); strinfo = (strinfo == "|| Strinfo ==" 0 " )? "Not announced": Strinfo; AddoneElement ("in finding", strinfo, "AIM"); strinfo = DR ["character0"] == null? "": DR ["character0"]. TOSTRING (); AddoneElement ("Self-introduction", Strinfo, "Myself"); String Ocommon = DR ["common"] == null? "": DR ["common"]. ToString (). Trim (); string osport = DR [ "Sport"] == NULL? ": DR [" Sport "]. toString (). Trim (); string od == NULL?": DR ["Season"]. Tostring () .Trim (); String Ofilm = DR ["film"] == null? ": DR [" film "]. Tostring (). Trim (); string omusic = DR [" music "] == null ? "": DR ["Music"]. TOSTRING (). Trim (); string Omenu = DR ["MENU"] == NULL? ": DR [" MENU "]. TOSTRING (). Trim (); String ocolor = DR ["color"] == null? "": DR ["color"]. Tostring (). Trim (); string == null? ": DR ["] == null? ": DR [" "]. Tostring (). Trim (); string OLANGUAGE = DR [" Language0 "] == NULL?": DR ["Language0"]. Tostring (). Trim (); Dr.close (); if (Ocommon == "") ... {addoneElement ("hobby", "unconventional", "common");} else ... {SQL = "Select * from b_common where id in (" Ocommon ")"; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = cm.executeReader (); strinfo = "" While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement ("hobby", strinfo, "common");} if (osport == ") ... {addoneElement," unconventional "," sport ");} Else ... { SQL = "Select * from b_sport where id in (" osport ")"; cm.commandtext = SQL; cm.commandtype = commandType.Text; Dr = cm.executeReader (); strinfo = ""; while (DR). Read ()) ... {STRINFO = "" DR ["Name"]. TOSTRING ();} Dr.close (); if (strinfo == ") Strinfo =" Not disclosed "; addoneElement (" favorite Sports ", Strinfo," Sport ");} IF OSEASON == "" "... {AddoneElement (" Love Season "," Unconventional "," Season ");} else ... {sql =" SELECT * from b_season where id in (" odason " ) "; Cm.commandtext = sql; cm.commandtype = commandType.text; dr = cm.executeReader (); strinfo =" " While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement ("Love Season", Strinfo, "Season");} if (Ofilm == ") ... {AddoneElement (" Favorite Movie "," Film ");} else. .. {SQL = "SELECT * from b_film where id in (" ofilm ")"; cm.commandtext = SQL; cm.commandtype = commandType.Text; Dr = cm.executeReader (); strinfo = "; while (DR.READ ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddOndeElement ("Favorite Movie", Strinfo, "Film");} IF (om USIC == "") ... {AddoneElement, "unconventional", "music");} else ... {SQL = "SELECT * from b_music where id in (" omusic " ) "; Cm.commandtext = sql; cm.commandtype = commandType.text; dr = cm.executeReader (); strinfo =" " While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement, Strinfo, "Music");} if (Omenu == ") ... {AddoneElement (" Preference "," Unended "," Menu ");} else .. . {SQL = "SELECT * from b_menu where id in (" omnu ")"; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = cm.executeReader (); strinfo = ""; while Dr.read ()) ... {STRINFO = "" DR ["Name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement "Preferences", Strinfo, "Menu");} IF (OCO LOR == "") ... {AddoneElement ("Favorite Colors", "Not", "Color");} else ... {sql = "SELECT * from b_color where id in (" Ocolor " ) "; Cm.commandtext = sql; cm.commandtype = commandType.text; dr = cm.executeReader (); strinfo =" " While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement ("Favorite Colors", Strinfo, "Color");} if (Odress == ") ... {AddoneElement (" Daily Dress Up "," Dreme "," DRESS ");} else .. {SQL = "SELECT * from b_dress where id in (" Odress ")"; cm.commandtext = SQL; cm.commandType = CommandType.Text; DR = cm.executeReader (); strinfo = ""; while Dr.read ()) ... {STRINFO = "" DR ["Name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement "Daily Dress Up", Strinfo, "Dress"); f (OLANGUAGE == "") ... {AddoneElement ("Language Ability", "LANGUAG");} else ... {SQL = "SELECT * from b_language where id in (" OLANGUAGUAGUAGUAGUE ")"; Cm.commandtext = SQL; cm.commandtype = commandType.text; dr = cm.executeReader (); strinfo = "" While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement ("Language Ability", Strinfo, "Language");} SQL = "Select * from userlogin where username = '" IDD "" "; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = Cm.executeReader (); strinfo = ""; if (Dr.Read ()) ... {strinfo = DR ["logintime"] == NULL? ": Convert.TodateTime (DR [" Logintime "]). TOSTRING ("YYYY-MM-DD HH: MM"); AddoneElement ("Recent Login Time", Strinfo, "Logintime"); STRINFO = DR ["LoginCount"] == NULL? ": DR [" LoginCount "] .Tostring (); addoneElement ("Login number", Strinfo, "LoginCount");} else ... {addoneElement ("Recent login time", "," logintime "); Strinfo = DR ["LoginCount"] == NULL? "": DR ["logincount"]. Tostring (); addoneElement ("Login number", "", "logincount");} Dr.close (); sql = "Select * from personalphoto where username = '" IDD "'"; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = cm.executeReader (); strinfo = ""; if (Dr.Read ()) ... {AddonePicLinkelement ("Personal Image", "ShowPhoto_P.ASPX? IDD =" IDD, "OriginPhoto.aspx? IDD = " IDD," Selfimg ");} else ... {AddonePicLinkelement (" Personal Image "," ImageS / No_Photo.gif "," OriginPhoto.aspx? IDD = " IDD," Selfimg ");} DR .Close (); SQL = "SELECT Photo, Introduce from myalbum where username = '" IDD "'"; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = cm.executeReader (); strinfo = ""; Sbxml.append (" / Count> ");} sbxml.append (" album> "); Dr.close (); addoneElement (" User Name ", IDD," Username); Addonelinkelement ("Contact:", "MyleaveWord / Add .aspx? user_id = " IDD," Contact this Member "," LinkMethod "); Addonelinkelement (" Add Contact List "," MyleaveWord / AddTolinkmanList.aspx? u_id = " IDD," Add Contact List "," AddLinkman " Addonelinkelement ("Add to Pursuit List", "MyleaveWord / AddooerList.aspx? U_id =" IDD, "Add to Pursuit List", "AddWooer"); Addonelinkelement ("Mood Diary", "MyDiary / Personalpubdiary.aspx? User_id = " IDD," Browse My Mood Diary "," LookDia "); SBXML.Append (" Personal> "); FILESTREAM FS = file.Open (Server.MAppath (XMLName), FileMode.create, FileAccess.write Fileshare.write; streamwriter write = new streamwriter (fs); Writer.write (); writer.flush (); fs.close (); Response.write (sbxml.tostring ()); // throw new argumentException ("Update Home Finished! ");} Catch (exception ex) ... {//loveandfriend.myleaveword.pubfunction.alertMessage (Ex.Message); response.write (ex.Message);} finally ... {cm.dispose (); MyConnection . Close (); myconnection.dispose ();}} void AddoneElement String ONAME, String Ovalue, String Olement ... {Sbxml.append ("<" OEEMENT ">"); sbxml.append (" Void Addonelinkelement String ONAME, String Olink, String OText, String Olement ... {Sbxml.append ("<" OEEMENT ">"); sbxml.append (" Void AddonePicLinkelement String ONAME, String OSRC, String Olink, String Olement ... {Sbxml.append ("<" OEEMENT ">"); sbxml.append (" The XSL template code is as follows: XML Version = '1.0' encoding = "UTF-8" ?> < XSL: Stylesheet Version = "1.0" XMLns: XSL = "http://www.w3.org/1999/xsl/transform" > < XSL: Template Match = '/'>
> > < Title > Title > < Style Type = "Text / CSS" > Body {text-align: center} td {font-size: 12px; color: # 666666; line-height: 150%} Style > HEAD > < Body TEXT = "# 000000" Bgcolor = "# f2f2f2" LEFTMARGIN = "0" Topmargin = "0" Marginheight = "0" > < TABLE HEIGHT = "40" Cellspacing = "0" Cellpadding = "0" Width = "100%" Align = "center" Bgcolor = "White" Border = "0" > < TBODY > < TR > < TD > < A HREF = "http://www.163.com/" > < IMG HEIGHT = "30" SRC = "Template / Template01 / Ne_Logo2.gif" Width = "90" Border = "0" /> A > < A HREF = "http://love.163.com/" > < IMG HEIGHT = "29" SRC = "Template / Template01 / Love_Logo2.gif" Width = "69" Border = "0" /> A > TD > < TD > < XSL: Comment > - Contact this member's connection start - XSL: Comment > < XSL: ELEMENT Name = "a" > < XSL: Attribute Name = "Target" > _blank XSL: Attribute > < XSL: Attribute Name = "HREF" > < XSL: Value-of SELECT = "Personal / LinkMethod / Link" /> XSL: Attribute > < XSL: Value-of SELECT = "Personal / LinkMethod / Text" /> XSL: ELEMENT > < Remark >
contact details -> Remark > < XSL: Comment > - Contact this member's connection end - XSL: Comment > < XSL: Comment > - Join the contact list connection start - XSL: Comment > < XSL: ELEMENT Name = "a" > < XSL: Attribute Name = "Target" > _blank XSL: Attribute > < XSL: Attribute Name = "HREF" > < XSL: Value-of SELECT = "Personal / AddLinkman / Link" /> XSL: Attribute > < XSL: Value-of SELECT = "Personal / AddLinkman / Text" /> XSL: ELEMENT > < Remark >
Join the contact list -> Remark > < XSL: Comment > - Join the connection list connection end - XSL: Comment > < XSL: Comment > - Join the pursuit list connection start - XSL: Comment > < XSL: ELEMENT Name = "a" > < XSL: Attribute Name = "Target" > _blank XSL: Attribute > < XSL: Attribute Name = "HREF" > < XSL: Value-of SELECT = "Personal / AddWooer / Link" /> XSL: Attribute > < XSL: Value-of SELECT = "Personal / AddWooer / Text" /> XSL: ELEMENT > < Remark >
Join the pursuit list -> Remark > < XSL: Comment > - Join the connection of the pursuit list - XSL: Comment > TD > TR > TBODY > TABLE > < TABLE HEIGHT = "17" Cellspacing = "0" Cellpadding = "0" Width = "800" Align = "center" Border = "0" > < TBODY > < TR > < TD BACKGROUND = "Template / Template01 / TOPDOT.GIF" > TD > TR > TBODY > TABLE > < Br /> < TABLE Style = "Cursor: HAND" HEIGHT = "58" Cellspacing = "0" Cellpadding = "0" Width = "755" Align = "center" BACKGROUND = "Template / Template01 / 08_1.gif" Border = "0" > < TBODY > < TR > < TD Width = "302" > TD > < TD Align = "Left" > TD > TR > TBODY > TABLE > < Br /> < TABLE Cellspacing = "0" Cellpadding = "0" Width = "800" Align = "center" Border = "0" > < TBODY > < TR > < TD Valign = "TOP" Width = "245" Bgcolor = "# f2f2f2" > < Br /> < TABLE HEIGHT = "200" Cellspacing = "0" Cellpadding = "0" Width = "80" Border = "0" > < TBODY > < TR > < TD Colspan = "3" > < IMG HEIGHT = "34" SRC = "Template / Template01 / Mypptop.gif" Width = "209" /> TD > TR > < TR > < TD Width = "7" BACKGROUND = "Template / template01 / myppleftdot.gif" > TD > < TD Valign = "TOP" Align = "center" > < XSL: Comment > - Personal image Start - XSL: Comment > < XSL: ELEMENT Name = "a" > < XSL: Attribute Name = "Target" > _blank XSL: Attribute > < XSL: Attribute Name = "HREF" > < XSL: Value-of SELECT = "Personal / Selfimg / Link" /> XSL: Attribute > < XSL: ELEMENT Name = "IMG" > < XSL: Attribute Name = "Border" > 0 XSL: Attribute > < XSL: Attribute Name = "width" > 200 XSL: Attribute > < XSL: Attribute Name = "Height" > 150 XSL: Attribute > < XSL: Attribute Name = "SRC" > < XSL: Value-of SELECT = "Personal / Selfimg / SRC" /> XSL: Attribute > XSL: ELEMENT > XSL: ELEMENT > < Remark >
Personal image -> Remark > < XSL: Comment > - Personal image End - XSL: Comment > TD > < TD Width = "8" BACKGROUND = "Template / Template01 / Mypprightdot.gif" > TD > TR > < TR > < TD Colspan = "3" > < IMG HEIGHT = "25" SRC = "Template / Template01 / MyppTopdown.gif" Width = "209" /> TD > TR > TBODY > TABLE > < Br /> < Br /> < XSL: Comment > - Add Contact this member's connection start - XSL: Comment > < XSL: ELEMENT Name = "a" > < XSL: Attribute Name = "Target" > _blank XSL: Attribute > < XSL: Attribute Name = "HREF" > < XSL: Value-of SELECT = "Personal / LinkMethod / Link" /> XSL: Attribute > < XSL: Value-of SELECT = "Personal / LinkMethod / Text" /> XSL: ELEMENT > < Remark >
contact details -> Remark > < XSL: Comment > - Add Contact this member's connection END - XSL: Comment > < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < Br /> < TABLE HEIGHT = "200" Cellspacing = "0" Cellpadding = "0" Width = "80" Border = "0" > < TBODY > < TR > < TD Colspan = "3" > < IMG HEIGHT = "34" SRC = "Template / Template01 / Mypptop.gif" Width = "220" /> TD > TR > < TR > < TD Width = "7" BACKGROUND = "Template / template01 / myppleftdot.gif" > TD > < TD > < TABLE Cellspacing = "2" Cellpadding = "0" Border = "0" Valign = "TOP" > < TBODY > < TR > < TD > < TABLE Class = "p1" Cellspacing = "0" Cellpadding = "0" Border = "0" > < TBODY > < TR > < TD Colspan = "3" > < Span Style = 'CURSOR: HAND' Onclick = 'ShowbigPhoto ();'> HEIGHT = "170" id = "album" Alt = "My Album" SRC = "Template / Template01 / PHOTOES.GIF" Width = "200" Border = "0" Name = "CardPict" /> Span > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > < XSL: choose > < XSL: WHEN Test = "Personal / album [count> 0]"> < Center > < FORM Name = "albumlist" > < SELECT Class = "p1" ONCHANGE = "Showalbum ()" Name = "Albumtitle" > < XSL: For-Each SELECT = "/ Personal / album / photo" > < Option Value = "0" > < XSL: Attribute Name = "Value" > < XSL: Value-of SELECT = "FileName" /> XSL: Attribute > < XSL: Value-of SELECT = "Title" /> Option > XSL: For-Each > SELECT > FORM > Center > XSL: WHEN > XSL: choose > TD > < TD Width = "8" BACKGROUND = "Template / Template01 / Mypprightdot.gif" > TD > TR > < TR > < TD Colspan = "3" > < IMG HEIGHT = "25" SRC = "Template / Template01 / MyppTopdown.gif" Width = "220" /> TD > TR > TBODY > TABLE > < Br /> < Br /> TD > < TD Valign = "TOP" Width = "545" > < IMG HEIGHT = "29" SRC = "Template / Template01 / Topline.gif" Width = "548" /> < Br /> < TABLE Cellspacing = "0" Cellpadding = "0" Width = "548" Border = "0" > < TBODY > < TR > < TD Width = "1" Bgcolor = "# aaaaa" RowsPan = "2" > < Spacer Width = "1" Type = "block" /> TD > < TD Valign = "TOP" Width = "301" Bgcolor = "# e7e9eb" > < TABLE Cellspacing = "0" Cellpadding = "0" Width = "278" Border = "0" > < TBODY > < TR > < TD Colspan = "2" > < IMG HEIGHT = "47" SRC = "Template / Template01 / Grda.gif" Width = "142" /> TD > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Nickname / Name" /> TD > < Remark >
My name -> Remark > < TD Class = "Type" Width = "39%" > < XSL: Value-of SELECT = "Personal / Nickname / Value" /> TD > < Remark >
My name -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / SEX / NAME" /> TD > < Remark >
gender -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / SEX / VALUE" /> TD > < Remark >
gender -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Birthday / Name" /> TD > < Remark >
Birthday -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Birthday / Value" /> TD > < Remark >
Birthday -> Remark > TR > < TR > < TDCLASS = "Type" > < XSL: Value-of SELECT = "Personal / State / Name" /> TD > < Remark >
height -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / State / Value" /> TD > < Remark >
height -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Avoirdupois / Name" /> TD > < Remark >
body weight -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Avoirdupois / Value" /> TD > < Remark >
body weight -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Bodiliform / Name" /> TD > < Remark >
Body shape -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Bodiliform / Value" /> TD > < Remark >
Body shape -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / BloodType / Name" /> TD > < Remark >
blood type -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / BloodType / Value" /> TD > < Remark >
blood type -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP" > < XSL: Value-ofselect = "Personal / Language / Name" /> TD > < Remark >
language skills -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Language / Value" /> TD > < Remark >
language skills -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP" > < XSL: Value-of SELECT = "Personal / City / Name" /> TD > < Remark >
location -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / City / Value" /> TD > < Remark >
location -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / LinkMethod / Name" /> TD > < Remark >
contact details -> Remark > < TD Class = "Data" > < XSL: Comment > - Add Contact this member's connection start - XSL: Comment > < XSL: ELEMENT Name = "a" > < XSL: Attribute Name = "Target" > _blank XSL: Attribute > < XSL: Attribute Name = "HREF" > < XSL: Value-of SELECT = "Personal / LinkMethod / Link" /> XSL: Attribute > < XSL: Value-of SELECT = "Personal / LinkMethod / Text" /> XSL: ELEMENT > < Remark >
contact details -> Remark > < XSL: Comment > - Add Contact this member's connection END - XSL: Comment > TD > TR > < TR > < TD Class = "Type" > SELECT = "Personal / LookDiary / Name" /> TD > < Remark >
Mood diary -> Remark > < TD Class = "Data" > < XSL: Comment > - Add View Mood Diary Connection START - XSL: Comment > < XSL: ELEMENT Name = "a" > < XSL: Attribute Name = "Target" > _blank XSL: Attribute > < XSL: Attribute Name = "HREF" > < XSL: Value-of SELECT = "Personal / LookDiary / Link" /> XSL: Attribute > < XSL: Value-of SELECT = "Personal / LookDiary / Text" /> XSL: ELEMENT > < Remark >
contact details -> Remark > < XSL: Comment > - Add View Mood Diary Connection End - XSL: Comment > TD > TR > < TR > < TD BACKGROUND = "Template / Template01 / Dotline.gif" Colspan = "2" HEIGHT = "1" > < Spacer Width = "1" Type = "block" /> TD > TR > TBODY > TABLE > < Br /> < TABLE Cellspacing = "0" Cellpadding = "0" Width = "278" Border = "0" > < TBODY > < TR > < TD Colspan = "2" > < IMG HEIGHT = "52" SRC = "Template / Template01 / WHOAMI.GIF" Width = "142" /> TD > TR > < TR > < TD Class = "Type" Width = "39%" > < XSL: Value-of SELECT = "Personal / Marry / Name" /> TD > < Remark >
marital status -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Marry / Value" /> TD > < Remark >
marital status -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Vocation / Name" /> TD > < Remark >
Occupation -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Vocation / Value" /> TD > < Remark >
Occupation -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Title / Name" /> TD > < Remark >
Career title -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Title / Value" /> TD > < Remark >
Career title -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / income / name" /> TD > < Remark >
Income level -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / income / value" /> TD > < Remark >
Income level -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Schoolage / Name" /> TD > < Remark >
Education level -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Schoolage / Value" /> TD > < Remark >
Education level -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Smoke / Name" /> TD > < Remark >
Do you smoke? -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Smoke / Value" /> TD > < Remark >
Do you smoke? -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Drink / Name" /> TD > < Remark >
Whether to drink -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Drink / Value" /> TD > < Remark >
Whether to drink -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP" > < XSL: Value-of SELECT = "Personal / Common / Name" /> TD > < Remark >
Hobby -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Common / Value" /> TD > < Remark >
Hobby -> Remark > TR > < TR > < TD BACKGROUND = "Template / Template01 / Dotline.gif" Colspan = "2" HEIGHT = "1" > < Spacer Width = "1" Type = "block" /> TD > TR > TBODY > TABLE > < Br /> < TABLE Cellspacing = "0" Cellpadding = "0" Width = "278" Border = "0" > < TBODY > < TR > < TD Colspan = "2" > < IMG HEIGHT = "50" SRC = "Template / Template01 / Mychoose.gif" Width = "142" /> TD > TR > < TR > < TD Class = "Type" Width = "39%" > < XSL: Value-of SELECT = "Personal / AIM / Name" /> TD > < Remark >
Look for -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / AIM / VALUE" /> TD > < Remark >
Look for -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP" > < XSL: Value-of SELECT = "Personal / Sport / Name" /> TD > < Remark >
Favorite sport -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Sport / Value" /> TD > < Remark >
Favorite sport -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Season / Name" /> TD > < Remark >
Love season -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Season / Value" /> TD > < Remark >
Love season -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP" > < XSL: Value-ofselect = "Personal / Film / Name" /> TD > < Remark >
Favorite movie -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Film / Value" /> TD > < Remark >
Favorite movie -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP" > < XSL: Value-of SELECT = "Personal / Music / Name" /> TD > < Remark >
Pour -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Music / Value" /> TD > < Remark >
Pour -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP" > < XSL: Value-of SELECT = "Personal / Menu / Name" /> TD > < Remark >
Preference -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Menu / Value" /> TD > < Remark >
Preference -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP" > < XSL: Value-of SELECT = "Personal / Color / Name" /> TD > < Remark >
favourite colour -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Color / Value" /> TD > < Remark >
favourite colour -> Remark > TR > < TR > < TD Class = "Type" Valign = "TOP"> < XSL: Value-of SELECT = "Personal / Dress / Name" /> TD > < Remark >
Daily dress -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Dress / Value" /> TD > < Remark >
Daily dress -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / Regtime / Name" /> TD > < Remark >
Registration time -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / RegTIME / VALUE" /> TD > < Remark >
Registration time -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / logintime / Name" /> TD > < Remark >
last login time -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / Logintime / Value" /> TD > < Remark >
last login time -> Remark > TR > < TR > < TD Class = "Type" > < XSL: Value-of SELECT = "Personal / LoginCount / Name" /> TD > < Remark >
Number of logins -> Remark > < TD Class = "Data" > < XSL: Value-of SELECT = "Personal / LoginCount / Value" /> TD > < Remark >
Number of logins -> Remark > TR > TBODY > TABLE > < Br /> < Br /> TD > < TD Width = "9" Background = "Template / Template01 / VLINE.GIF" RowsPan = "2" > < Spacer Width = "1" Type = "block" /> TD > < TD Valign = "TOP" Bgcolor = "# DFE4E7" RowsPan = "2" > < TABLE Cellspacing = "0" Cellpadding = "0" Width = "224" Align = "center" Border = "0" > < TBODY > < TR > < TD > < IMG HEIGHT = "15" SRC = "Template / Template01 / Zwjs.gif" Width = "98" /> TD > TR > < TR > < TD > < XSL: Value-of SELECT = "Personal / Myself / Value" /> TD > < Remark >
Self introduction -> Remark > TR > TBODY > TABLE > TD > < TD Width = "1" Bgcolor = "# aaaaa" RowsPan = "2" > TD > TR > < TR > < TD Bgcolor = "# aaaaa" HEIGHT = "1" > TD > TR > TBODY > TABLE > < TABLE Cellspacing = "0" Cellpadding = "0" Width = "548" Border = "0" > < TBODY > < TR > < TD Align = "Right" > < IMG HEIGHT = "16" SRC = "Template / Template01 / bottom.gif" Width = "244" /> TD > TR > TBODY > TABLE > < Br /> < Br /> TD > TR > TBODY > TABLE > Body > HTML >
Save personal information -> < Span id = "UserID" Style = "Visibility: Hidden" > < XSL: Value-of SELECT = "Personal / Username / Value" /> < Remark >
Save the owner of the current home page -> Remark > Span >
Save personal information -> < Script Language = 'JavaScript' Type = "Text / JavaScript" > Showalbum (); // Used to select photos in the photo album Function Showalbum () {if (Document.albumlist) {if (Document.albumlist.albumtitle) {var Selid = Document.albumlist.albumtitle.selectedIndIndex; var Uid = userid .innertext; album.src = "albumpath /" UID "/" Document.albumlist.albumtitle.Options [Selid] .value;}}} // is used to open a new window to display larger image Function ShowbigPhoto () {Var src = album.src; if (src! = ") {Window.open (src, '_ blank', 'width = 600, height = 400');}} Script > XSL: Template > XSL: Stylesheet > The code format XML data with XSL template is as follows: SqlConnection myconnection; String Username; String UserId; String Idd; StringBuilder SBXML; String XMLName; Private Void Page_load Object Sender, System.EventArgs E) ... {MyConnection = new SqlConnection (System.Configuration.ConfigurationSettings.AppSettings [ "ConnectionString"]);? UserID = LoveAndFriend.pMethod.getCookie ( "UserID") == null "null" :( string) LoveAndFriend.pMethod.getCookie ( " UserID "); UserName = LoveAndFriend.pMethod.getCookie (" UserName "?) == null" null ":( string) LoveAndFriend.pMethod.getCookie (" UserName "); myConnection = new SqlConnection (System.Configuration.ConfigurationSettings.AppSettings ["Connectionstring"]); IDD = Request ["IDD"] == NULL? "": Request ["IDD"]. Tostring (); if (idd == "") ... {response.write (" Load information error, please log in to access! "); Response.end ();} xmlname =" xml / " IDD " .xml "; myconnection.open (); if (! Ispostback) ... { IF (file.exists (server.mappath (xmlname))) ... {Showxml ();} else ... {Cr Eatexml ();}}} private Void Showxml () ... {SQLCOMMAND CM = New SQLCOMMAND (); string strinfo = ""; try ... {cm.connection = myconnection; sqldatarader DR; string sql; sql = "select * from reg_user where username = ' IDD "' " Cm.commandtext = SQL; cm.commandtype = commandType.text; Dr = cm.executeReader (); if (! Dr.hasRows) ... {Dr.close (); throw new argumentException ("When using user information Error! ");} Dr.read (); int T_id = DR [" mainpage "] == NULL? 0: Convert.Toint32 (DR [" ""]); Dr.close (); if (t_id! = 0) ... {cm.commandtext = "Select * from personalweb where point_id =" t_id.toString ();} else ... {cm.commandtext = "SELECT * From personalweb where isdefault = 1 ";} cm.commandtype = commandType.text; cm.connection = myconnection; dr = cm.executeRection; if (! Dr.hasRows) ... {Dr.close (); throw New ArgumentException ("Personal Home Template error! ");} Dr.read (); strinfo = DR [" tmpname "] == NULL?": DR ["tmpname"]. ToString (); if (strinfo == " ) ... {Dr.close (); throw new argumentException ("Personal Home Template Error!");} Dr.close (); System.xml.xmlTextReader Reader = New XmlTextReader (Server.MAppath (XMLName)); System .Xml .xsl.xsltransform tran = new system.xml.xsl.xsltransform (); TRANTRANSFORM (); TRAN.LOAD (Server.mAppath (".") "/ Template /" strinfo); xpathdocument mydata = new xpathDocument (reader); XmlWriter writer = new XmlTextWriter (Response.OutputStream, System.Text .Encoding .Default); tran.Transform (mydata, null, writer, null); reader.Close (); writer.Close ();} catch (Exception ex) ... {LoveAndFriend.myleaveWord.pubfunction.alertMessage (ex.Message);} finally ... {cm.dispose (); myconnection.close (); Myc Onnection.dispose ();}} private Void Createxml () ... {SQLCOMMAND CM = New SQLCOMMAND (); String Strinfo = ""; try ... {cm.connection = myconnection; sqldatarader DR; sbxml = new stringbuilder (); sbxml.append (" } Else ... {cm.commandtext = "select * from personalweb where isdefault = 1";} cm.commandtype = commandType.text; cm.connection = myconnection; dr = cm.executeRectioner (); if (! Dr.hasRows ) ... {Dr.close (); throw new argumentException ("Personal home page template error!");} Dr.read (); strinfo = DR ["tmpname"] == null? ": DR [" TMPNAME "] .Tostring (); if (str.close (); throw new argumentException (" Personal Home Template Error! ");} SBXML.Append (" Throw new argumentException ("Load user information is wrong!");} Dr.read (); strinfo = DR ["stature"] == NULL? ": DR [" stature "]. Tostring (); strinfo = (Strinfo == "" | | Strinfo == "0")? "Not announced": Strinfo "cm"; addoneElement ("height", strinfo, "stature"); strinfo = DR ["avoirdupois"] == NULL? "": DR ["avoirdupois"]. TOSTRING (); strinfo = (strinfo == "|| Strinfo ==" 0 ")?" Not announced ": Strinfo " kg "; addoneElement (" Weight " Strinfo, "avoirdupois"); strinfo = DR ["bloodType"] == null? "": DR ["bloodType"]. toString (); strinfo = (strinfo == "" | | Strinfo == "0" )? "Not announced": STRINFO "type"; AddOndElement ("blood type", strinfo, "bloodtype"); strinfo = DR ["vocation"] == null? "": DR ["vocation"]. Tostring ); Strinfo = (Strinfo == "|| Strinfo ==" 0 ")?" Unpublished ": Strinfo; AddoneElement (" Engaged in Industry ", Strinfo," Vocation "); Strinfo = DR [" marry "] = = NULL? "": DR ["marry"]. toString (); strinfo = (STR INFO == "" | Strinfo == "0")? "Unpublished": STRINFO; AddOndelement ("Marriage Status", Strinfo, "Marry"); Strinfo = DR ["Title"] == NULL? "" : DR ["Title"]. TOSTRING (); Strinfo = (Strinfo == "|| Strinfo ==" 0 ")?" Unpublished ": Strinfo; AddOndelement (" Professional Title ", Strinfo," Title "); Strinfo = DR [" income "] == NULL ? "": DR ["income"]. TOSTRING (); strinfo = (Strinfo == "|| Strinfo ==" 0 ")?" Unpublished ": Strinfo; AddoneElement (" income level ", strinfo," INCOME "); STRINFO = DR [" Schoolage "] == NULL?": DR ["School"]. TOSTRING (); strinfo = (strinfo == "|| Strinfo ==" 0 ")?" Announced: Strinfo; AddoneElement ("Society", Strinfo, "Schoolage"); STRINFO = DR ["smoke"] == null? ": DR [" smoke "]. Tostring (); strinfo = (Strinfo = (Strinfo = == "" || Strinfo == "0")? "Unpublished": strinfo; addoneElement ("Do you smoke?", Strinfo, "smoke"); strinfo = DR ["drink"] == null? "" : DR ["Drink"]. TOSTRING (); strinfo = (Strinfo == "| | Strinfo ==" 0 ")?" Unpublished ": strinfo; addoneElement (" Will drink? ", Strinfo," Drink " ); Strinfo = DR ["AIM"] == NULL? "": DR ["AIM"]. TOSTRING (); strinfo = (strinfo == "|| Strinfo ==" 0 " )? "Not announced": Strinfo; AddoneElement ("in finding", strinfo, "AIM"); strinfo = DR ["character0"] == null? "": DR ["character0"]. TOSTRING (); AddoneElement ("Self-introduction", Strinfo, "Myself"); String Ocommon = DR ["common"] == null? "": DR ["common"]. ToString (). Trim (); string osport = DR [ "Sport"] == NULL? ": DR [" Sport "]. toString (). Trim (); string od == NULL?": DR ["Season"]. Tostring () .Trim (); String Ofilm = DR ["film"] == null? ": DR [" film "]. Tostring (). Trim (); string omusic = DR [" music "] == null ? "": DR ["Music"]. TOSTRING (). Trim (); string Omenu = DR ["MENU"] == NULL? ": DR [" MENU "]. TOSTRING (). Trim (); String ocolor = DR ["color"] == null? "": DR ["color"]. Tostring (). Trim (); string == null? ": DR ["] == null? ": DR [" "]. Tostring (). Trim (); string OLANGUAGE = DR [" Language0 "] == NULL?": DR ["Language0"]. Tostring (). Trim (); Dr.close (); if (Ocommon == "") ... {addoneElement ("hobby", "unconventional", "common");} else ... {SQL = "Select * from b_common where id in (" Ocommon ")"; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = cm.executeReader (); strinfo = "" While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement ("hobby", strinfo, "common");} if (osport == ") ... {addoneElement," unconventional "," sport ");} Else ... { SQL = "Select * from b_sport where id in (" osport ")"; cm.commandtext = SQL; cm.commandtype = commandType.Text; Dr = cm.executeReader (); strinfo = ""; while (DR). Read ()) ... {STRINFO = "" DR ["Name"]. TOSTRING ();} Dr.close (); if (strinfo == ") Strinfo =" Not disclosed "; addoneElement (" favorite Sports ", Strinfo," Sport ");} IF OSEASON == "" "... {AddoneElement (" Love Season "," Unconventional "," Season ");} else ... {sql =" SELECT * from b_season where id in (" odason " ) "; Cm.commandtext = sql; cm.commandtype = commandType.text; dr = cm.executeReader (); strinfo =" " While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement ("Love Season", Strinfo, "Season");} if (Ofilm == ") ... {AddoneElement (" Favorite Movie "," Film ");} else. .. {SQL = "SELECT * from b_film where id in (" ofilm ")"; cm.commandtext = SQL; cm.commandtype = commandType.Text; Dr = cm.executeReader (); strinfo = "; while (DR.READ ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddOndeElement ("Favorite Movie", Strinfo, "Film");} IF (om USIC == "") ... {AddoneElement, "unconventional", "music");} else ... {SQL = "SELECT * from b_music where id in (" omusic " ) "; Cm.commandtext = sql; cm.commandtype = commandType.text; dr = cm.executeReader (); strinfo =" " While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement, Strinfo, "Music");} if (Omenu == ") ... {AddoneElement (" Preference "," Unended "," Menu ");} else .. . {SQL = "SELECT * from b_menu where id in (" omnu ")"; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = cm.executeReader (); strinfo = ""; while Dr.read ()) ... {STRINFO = "" DR ["Name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement "Preferences", Strinfo, "Menu");} IF (OCO LOR == "") ... {AddoneElement ("Favorite Colors", "Not", "Color");} else ... {sql = "SELECT * from b_color where id in (" Ocolor " ) "; Cm.commandtext = sql; cm.commandtype = commandType.text; dr = cm.executeReader (); strinfo =" " While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement ("Favorite Colors", Strinfo, "Color");} if (Odress == ") ... {AddoneElement (" Daily Dress Up "," Dreme "," DRESS ");} else .. {SQL = "SELECT * from b_dress where id in (" Odress ")"; cm.commandtext = SQL; cm.commandType = CommandType.Text; DR = cm.executeReader (); strinfo = ""; while Dr.read ()) ... {STRINFO = "" DR ["Name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement "Daily Dress Up", Strinfo, "Dress"); f (OLANGUAGE == "") ... {AddoneElement ("Language Ability", "LANGUAG");} else ... {SQL = "SELECT * from b_language where id in (" OLANGUAGUAGUAGUAGUE ")"; Cm.commandtext = SQL; cm.commandtype = commandType.text; dr = cm.executeReader (); strinfo = "" While (Dr.Read ()) ... {STRINFO = "" DR ["name"]. Tostring ();} Dr.close (); if (strinfo == ") Strinfo =" Unended "; AddoneElement ("Language Ability", Strinfo, "Language");} SQL = "Select * from userlogin where username = '" IDD "" "; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = Cm.executeReader (); strinfo = ""; if (Dr.Read ()) ... {strinfo = DR ["logintime"] == NULL? ": Convert.TodateTime (DR [" Logintime "]). TOSTRING ("YYYY-MM-DD HH: MM"); AddoneElement ("Recent Login Time", Strinfo, "Logintime"); STRINFO = DR ["LoginCount"] == NULL? ": DR [" LoginCount "] .Tostring (); addoneElement ("Login number", Strinfo, "LoginCount");} else ... {addoneElement ("Recent login time", "," logintime "); Strinfo = DR ["LoginCount"] == NULL? "": DR ["logincount"]. Tostring (); addoneElement ("Login number", "", "logincount");} Dr.close (); sql = "Select * from personalphoto where username = '" IDD "'"; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = cm.executeReader (); strinfo = ""; if (Dr.Read ()) ... {AddonePicLinkelement ("Personal Image", "ShowPhoto_P.ASPX? IDD =" IDD, "OriginPhoto.aspx? IDD = " IDD," Selfimg ");} else ... {AddonePicLinkelement (" Personal Image "," ImageS / No_Photo.gif "," OriginPhoto.aspx? IDD = " IDD," Selfimg ");} DR .Close (); SQL = "SELECT Photo, Introduce from myalbum where username = '" IDD "'"; cm.commandtext = SQL; cm.commandtype = commandType.Text; DR = cm.executeReader (); strinfo = ""; Sbxml.append (" / Count> ");} sbxml.append (" album> "); Dr.close (); addoneElement (" User Name ", IDD," Username); Addonelinkelement ("Contact:", "MyleaveWord / Add .aspx? user_id = " IDD," Contact this Member "," LinkMethod "); Addonelinkelement (" Add Contact List "," MyleaveWord / AddTolinkmanList.aspx? u_id = " IDD," Add Contact List "," AddLinkman " Addonelinkelement ("Add to Pursuit List", "MyleaveWord / AddooerList.aspx? U_id =" IDD, "Add to Pursuit List", "AddWooer"); Addonelinkelement ("Mood Diary", "MyDiary / Personalpubdiary.aspx? User_id = " IDD," Browse My Mood Diary "," LookDia "); SBXML.Append (" Personal> "); if (! File.exists (server.mappath (xmlname))) ... {filestream FS = File.open (server.mappath (xmlname), filemode.create, fileaccess.write, fileshare.write; ... {streamwriter write = new streamwriter (fs); Writer.wri TE (sbxml.tostring (); Writer.Flush (); fs.close ();}} response.write (sbxml.tostring ());} catch (exception ex) ... {loveAndFriend.myleaveWord.pubfunction. AlertMessage (EX.MESSAGE);} finally ... {cm.dispose (); myconnection.close (); myconnection.dispose ();}} void AddoneElement (String ONAME, String Ovalue, String Olement ... {Sbxml.append ("<" OEEMENT ">"); sbxml.append (" Void Addonelinkelement String ONAME, String Olink, String OText, String Olement ... {Sbxml.append ("<" OEEMENT ">"); sbxml.append (" Void AddonePicLinkelement String ONAME, String OSRC, String Olink, String Olement ... {Sbxml.append ("<" OEEMENT ">"); sbxml.append ("