Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
-
Upload
reynard-russell -
Category
Documents
-
view
212 -
download
0
Transcript of Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
Presentation Topic:Presentation Topic:
XML and ASPXML and ASP
Presented by Yanzhi ZhangPresented by Yanzhi Zhang
What is XML?What is XML?• XML stands for XML stands for ExtensibleExtensible Markup Markup LanguageLanguage
• XML is a XML is a markup languagemarkup language much like much like HTMLHTML
• XML is an open standardXML is an open standard
• XML was designed to XML was designed to describe datadescribe data
• XML tags are not predefined. You must XML tags are not predefined. You must definedefine
Your Own TagsYour Own Tags
• XML uses a XML uses a Document Type DefinitionDocument Type Definition
(DTD) or an (DTD) or an XML SchemaXML Schema to describe the to describe the data data
Simple XML CodeSimple XML Code
<?xml version="1.0" encoding="ISO-8859-<?xml version="1.0" encoding="ISO-8859-1" ?>1" ?>
<!-- Simple XML Code --> <!-- Simple XML Code --> <note><note> <to><to>CindyCindy</to> </to> <from><from>MikeMike</from> </from> <heading><heading>ReminderReminder</heading> </heading> <body><body>Don't forget to call me this Don't forget to call me this
weekend!weekend!</body> </body> </note></note>
Well formed & Valid XML Well formed & Valid XML
• ““Well formedWell formed” XML documents” XML documents• Conforming to the XML syntax rulesConforming to the XML syntax rules
• ““ValidValid” XML documents” XML documents• Well Formed and conforms to the rules of Well Formed and conforms to the rules of
DTDDTD
• DTD stands for Document Type DefinitionDTD stands for Document Type Definition
• <!DOCTYPE root-element [element-<!DOCTYPE root-element [element-declarations]>declarations]>
XML and HTMLXML and HTML
• Both are Standard Generalized Markup Both are Standard Generalized Markup LanguageLanguage
• HTML uses “HTML uses “Predefined tagsPredefined tags” || XML uses ” || XML uses ””Self-defined tagsSelf-defined tags””
• XML is XML is Case-SensitiveCase-Sensitive• XML must have a XML must have a closing tagclosing tag for all for all
elementselements• XML does not accept XML does not accept overlapping tagsoverlapping tags• XML is XML is complementcomplement to HTML instead of a to HTML instead of a
replacement replacement
How to display XML?How to display XML?
• CSSCSS
• XSLXSL
• JavaScriptJavaScript
Displaying XML with CSSDisplaying XML with CSS
• CSS is Cascading Style Sheets CSS is Cascading Style Sheets
• links the XML file to the CSS file links the XML file to the CSS file
<?xml-stylesheet type="text/css“ <?xml-stylesheet type="text/css“ href = "cd_catalog.css"?> href = "cd_catalog.css"?>
• CD_CatalogCD_Catalog XML Sample code XML Sample code
Displaying XML with XSLDisplaying XML with XSL
• XML Stylesheet LanguageXML Stylesheet Language• XSL consists of three parts:XSL consists of three parts:
• XSLT XSLT • XPathXPath• XSL Formatting ObjectsXSL Formatting Objects
• XSLT stands for XSL TransformationsXSLT stands for XSL Transformations eg: Transform XML into HTML to display eg: Transform XML into HTML to display
(XHTML)(XHTML) <?xml-stylesheet type="text/xsl" <?xml-stylesheet type="text/xsl"
href="food.xsl" ?>href="food.xsl" ?>• Food Menu sample codeFood Menu sample code• CD Catalog sample codeCD Catalog sample code
Displaying XML with Java Displaying XML with Java Script Script
• Why using Java Script?Why using Java Script?• For non XSL aware browsersFor non XSL aware browsers
• Do Browser-specific testingDo Browser-specific testing
• Use different style sheets according to Use different style sheets according to browser browser
and user needs and user needs
XML ServerXML Server
• Store XML on the serverStore XML on the server
• Generating XML with ASPGenerating XML with ASP
• Getting XML from a DataBaseGetting XML from a DataBase
One XML ApplicationOne XML Application
• Use Data Island to access xml fileUse Data Island to access xml file
• Use JavaScript to NavigateUse JavaScript to Navigate
• To see how XML increase the client To see how XML increase the client side processing data capabilitiesside processing data capabilities
• Application CodeApplication Code
Why XML is good?Why XML is good?
• Universal data exchange formatUniversal data exchange format
• Client-side processing and Client-side processing and manipulation of datamanipulation of data
• Search BetterSearch Better
• Getting Precise data updatesGetting Precise data updates
The EndThe End
Thank youThank you
What can you do with XML?What can you do with XML?
• Electronic CommerceElectronic Commerce
• Creating other markup languagesCreating other markup languages
• Push Technology (Web casting)Push Technology (Web casting)
• Advanced Search EngineAdvanced Search Engine
• Web-based Control systemsWeb-based Control systems