[ ]   [ ]   [ ]   [ ]



: 0
25-02-12 07:01


igor64
: 0
16-01-12 20:13


Lil`Ga.k.a43
: 1
09-01-12 11:23



   Web -
PHP


ASP






XML



CSS

SSI





   











   Web -








   









   










Web - / ASP.NET /

XML+MSSQL+ASP.NET. 1

, . - , - , . , " " - . .

, , () , , XML-, . , . qstart@narod.ru

XML . <?xml version="1.0"?>, ( <root>, ), , () . , . . . . XPath ( ) XSLT ( ), Web- (SOAP), MSSQL ( XML- MSSQL2005, XML - MSSQL2000) .

, ASP.NET, MSSQL2000 XML. 6 . ASP, , 5-7 . . , MSSQL XML . XML- , XSLT. , ASP.

ASP.NET , , .

( SQL IIS ) SqlXml 3.0 Service Pack 3 (SP3). http://www.microsoft.com/downloads/details.aspx?familyid=51D4A154-8E23-47D2-A033-764259CFB53B&displaylang=en. ( ).

, SqlXml, ASP.NET, , , , , SqlXml.

Program Files "SQLXML 3.0", CHM- .

( aspx)


<%@ Page Language="VB" %>
<%@ import Namespace="Microsoft.Data.SqlXML" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim cmd as SqlXmlCommand
cmd = New SqlXmlCommand("Provider=SQLOLEDB;server=(local);database=pubs; uid=sa;password=sa")
cmd.CommandText ="SELECT * FROM Titles FOR XML AUTO"
Response.ContentType = "text/xml"
cmd.RootTag = "root"
Response.Clear()
cmd.ExecuteToStream(Response.OutputStream)
End SUb
</script>


primer.aspx ( wwwroot) http://localhost/primer.aspx

IIS, NET Framework , MSSQL , ( )


<?xml version="1.0" encoding="utf-8" ?>
<root>
<Titles title_id="BU1032" title="The Busy Executive's Database Guide" type="business" pub_id="1389" price="19.99" advance="5000" royalty ="10" ytd_sales="4095" notes="An overview of available database systems with emphasis on common business applications. Illustrated." pubdate="1991-06-12T00:00:00" />
<Titles title_id="BU1111" title="Cooking with Computers: Surreptitious Balance Sheets" type="business" pub_id="1389" price="11.95" advance="5000" royalty="10" ytd_sales="3876" notes="Helpful hints on how to use your electronic resources to the best advantage." pubdate="1991-06-09T00:00:00" />
<Titles title_id="BU2075" title="You Can Combat Computer Stress!" type="business" pub_id="0736" price="2.99" advance="10125" royalty ="24" ytd_sales="18722" notes="The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations." pubdate="1991-06-30T00:00:00" />
</root>


FOR XML AUTO. , .

, ELEMENTS.



cmd.CommandText ="SELECT * FROM Titles FOR XML AUTO, ELEMENTS"


<titles> . .


<?xml version="1.0" encoding="utf-8" ?>
<root>
<Titles>
<title_id>BU1032</title_id>
<title>The Busy Executive's Database Guide</title>
<type>business</type>
<pub_id>1389</pub_id>
<price>19.99</price>
<advance>5000</advance>
<royalty>10</royalty>
<ytd_sales>4095</ytd_sales>
<notes>An overview of available database systems with emphasis on common business applications. Illustrated.</notes>
<pubdate>1991-06-12T00:00:00</pubdate>
</Titles>
<Titles>
<title_id>BU1111</title_id>
<title>Cooking with Computers: Surreptitious Balance Sheets</title>
<type>business</type>
<pub_id>1389</pub_id>
<price>11.95</price>
<advance>5000</advance>
<royalty>10</royalty>
<ytd_sales>3876</ytd_sales>
<notes>Helpful hints on how to use your electronic gt;resources to the best advantage.</notes>
<pubdate>1991-06-09T00:00:00</pubdate>
</Titles>
<Titles>
<title_id>BU2075</title_id>
<title>You Can Combat Computer Stress!</title>
<type>business</type>
<pub_id>0736</pub_id>
<price>2.99</price>
<advance>10125</advance>
<royalty>24</royalty>
<ytd_sales>18722</ytd_sales>
<notes>The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.</notes>
<pubdate>1991-06-30T00:00:00</pubdate>
</Titles>
</root>


- SELECT' - FOR XML EXPLICIT. XML- (), . XML-, - .

. - , SQL-, . SELECT 1 AS Tag, NULL AS Parent. Element!Tag!Attribute!Directive

, . , . (" SQL Server:") .

cmd.CommandText = "select 1 AS Tag, null as Parent, pub_id AS [!1!], title AS [!1!],price AS [!1!], ytd_sales AS [!1!] FROM titles FOR XML EXPLICIT"




<?xml version="1.0" encoding="utf-8" ?>
<root>
< ="1389" ="The Busy Executive's Database Guide" ="19.99" ="4095" />
< ="1389" ="Cooking with Computers: Surreptitious Balance Sheets" ="11.95" ="3876" />
< ="0736" ="You Can Combat Computer Stress!" ="2.99" ="18722" />
< ="1389" ="Straight Talk About Computers" ="19.99" ="4095" />
< ="0877" ="Silicon Valley Gastronomic Treats" ="19.99" ="2032" />
< ="0877" ="The Gourmet Microwave" ="2.99" ="22246" />
< ="0877" ="The Psychology of Computer Cooking" />
< ="1389" ="But Is It User Friendly?" ="22.95" ="8780" />
< ="1389" ="Secrets of Silicon Valley" ="20" ="4095" />
< ="1389" ="Net Etiquette" />
< ="0877" ="Computer Phobic AND Non-Phobic Individuals: Behavior Variations" ="21.59" ="375" />
< ="0736" ="Is Anger the Enemy?" ="10.95" ="2045" />
< ="0736" ="Life Without Fear" ="7" ="111" />
< ="0736" ="Prolonged Data Deprivation: Four Case Studies" ="19.99" ="4072" />
< ="0736" ="Emotional Security: A New Algorithm" ="7.99" ="3336" />
< ="0877" ="Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean" ="20.95" ="375" />
< ="0877" ="Fifty Years in Buckingham Palace Kitchens" ="11.95" ="15096" />
< ="0877" ="Sushi, Anyone?" ="14.99" ="4095" />
</root>


, -.

, . Directive - Element, .. [Row!1!!Element]

cmd.CommandText = "select 1 AS Tag, null as Parent, pub_id AS [!1!], title AS [!1!!Element],price AS [!1!!Element], ytd_sales AS [!1!!Element] FROM titles FOR XML EXPLICIT"


<?xml version="1.0" encoding="utf-8" ?>
<root>
< ="1389">
<>The Busy Executive's Database Guide</>
<>19.99</>
<>4095</>
</>
< ="1389">
<>Cooking with Computers: Surreptitious Balance Sheets</>
<>11.95</>
<>3876</>
</>
< ="0736">
<>You Can Combat Computer Stress!</>
<>2.99</>
<>18722</>
</>
< ="1389">
<>Straight Talk About Computers</>
<>19.99</>
<>4095</>
</>
< ="0877">
<>Silicon Valley Gastronomic Treats</>
<>19.99</>
<>2032</>
</>
</root>


. , (pub_id), .. pub_id . , pub_id, .

cmd.CommandText = "select 1 AS Tag, null as Parent, pub_id AS [!1!], NULL AS [!2!!Element],NULL AS [!2!!Element], NULL AS [!2!!Element] from titles UNION SELECT 2 AS Tag, 1 AS Parent, pub_id, title,price, ytd_sales FROM titles ORDER BY [!1!] FOR XML EXPLICIT"


<?xml version="1.0" encoding="utf-8" ?>
<root>
< ="0736">
<>
<>Emotional Security: A New Algorithm</>
<>7.99</>
<>3336</>
</>
<>
<>Is Anger the Enemy?</>
<>10.95</>
<>2045</>
</>
<>
<>Life Without Fear</>
<>7</>
<>111</>
</>
<>
<>Prolonged Data Deprivation: Four Case Studies</>
<>19.99</>
<>4072</>
</>
<>
<>You Can Combat Computer Stress!</>
<>2.99</>
<>18722</>
</>
</>
< ="0877">
<>
<>Computer Phobic AND Non-Phobic Individuals: Behavior Variations</>
<>21.59</>
<>375</>
</>
<>
<>Fifty Years in Buckingham Palace Kitchens</>
<>11.95</>
<>15096</>
</>
<>
<>Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean</>
<>20.95</>
<>375</>
</>
<>
<>Silicon Valley Gastronomic Treats</>
<>19.99</>
<>2032</>
</>
<>
<>Sushi, Anyone?</>
<>14.99</>
<>4095</>
</>
<>
<>The Gourmet Microwave</>
<>2.99</>
<>22246</>
</>
<>
<>The Psychology of Computer Cooking</>
</>
</>
< ="1389">
<>
<>But Is It User Friendly?</>
<>22.95</>
<>8780</>
</>
<>
<>Cooking with Computers: Surreptitious Balance Sheets</>
<>11.95</>
<>3876</>
</>
<>
<>Net Etiquette</>
</>
<>
<>Secrets of Silicon Valley</>
<>20</>
<>4095</>
</>
<>
<>Straight Talk About Computers</>
<>19.99</>
<>4095</>
</>
<>
<>The Busy Executive's Database Guide</>
<>19.99</>
<>4095</>
</>
</>
</root>


, XML , . , <> . Element.

cmd.CommandText = "select 1 AS Tag, null as Parent, pub_id AS [
!1!], NULL AS [!2!],NULL AS [!2!], NULL AS [!2!] from titles UNION SELECT 2 AS Tag,1 AS Parent, pub_id, title,price, ytd_sales FROM titles ORDER BY [!1!] FOR XML EXPLICIT"


:


<?xml version="1.0" encoding="utf-8" ?>
<root>
< ="0736">
< ="Emotional Security: A New Algorithm" ="7.99" ="3336" />
< ="Is Anger the Enemy?" ="10.95" ="2045" />
< ="Life Without Fear" ="7" ="111" />
< ="Prolonged Data Deprivation: Four Case Studies" ="19.99" ="4072" />
< ="You Can Combat Computer Stress!" ="2.99" ="18722" />
</>
< ="0877">
< ="Computer Phobic AND Non-Phobic Individuals: Behavior Variations" ="21.59" ="375" />
< ="Fifty Years in Buckingham Palace Kitchens" ="11.95" ="15096" />
< ="Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean" ="20.95" ="375" />
< ="Silicon Valley Gastronomic Treats" ="19.99" ="2032" />
< ="Sushi, Anyone?" ="14.99" ="4095" />
< ="The Gourmet Microwave" ="2.99" ="22246" />
< ="The Psychology of Computer Cooking" />
</>
< ="1389">
< ="But Is It User Friendly?" ="22.95" ="8780" />
< ="Cooking with Computers: Surreptitious Balance Sheets" ="11.95" ="3876" />
< ="Net Etiquette" />
< ="Secrets of Silicon Valley" ="20" ="4095" />
< ="Straight Talk About Computers" ="19.99" ="4095" />
< ="The Busy Executive's Database Guide" ="19.99" ="4095" />
</>
</root>


, HTML, -Excel (SpreadSheet) XSLT.


[ ]



  !



: Web - / ASP.NET /

DropDownList
23-03-2010   

, DropDownList SqlDataSource. SqlDataSource - , . DropDownList DataSource (DataSourceID=SqlDataSource1), (DataTextField=name), DataValueField=id. ...

: 0
. : - 167126 - 1

web.config
23-03-2010   

web.config web-. web.config -, . ...

: 2
. : - 83697 - 1

ASP .NET
23-03-2010   

ASP .NET , Visual Studio 2005 files ...

: 1
. : - 6997 - 0

MSSQL ASPX
23-03-2010   

, ...

: 0
. : - 4359 - 0

Include ASP .NET
23-03-2010   

: ASP .NET include () , PHP SSI. ASP .NET MasterPage UserControls. include?? :) ...

: 0
. : - 4563 - 2



e-mail:
:

| ?







IT -




-




  WWW.COMPROG.RU - 2009-2012 | Designed and Powered by Zaipov Renat | Projects