+ All Categories

Download - Xml Data Binding

Transcript
Page 1: Xml Data Binding

XML Data Binding

Presentation by Aaron BumaDevelopment DBA

Page 2: Xml Data Binding

What is “XML binding”

• Treating XML like a dataset that can be joined or referenced as a table in memory

Page 3: Xml Data Binding

Binding XML to SQL

• Using CROSS APPLY to combine XML data to a table• .Nodes() is used to pick the level of ‘rows’– Uses Xpath parameter– similar to a ‘join’

• .Value() is used to return data from the XML ‘rows’

Page 4: Xml Data Binding

Binding SQL into XML• Using Xpath to select Node level

• FLWOR to iterate over each node– For, Let, With, Order By, Return

• Custom Tags

• SQL Column References

Page 5: Xml Data Binding

DEMO

Page 6: Xml Data Binding

Review• Definition• Putting XML into SQL • Putting SQL into XML

Presentation Recording, Slides and Scripts– Available at:

http://www.aaronbuma.com/category/sql-training/– Contact:

Email: [email protected]


Top Related