Cross-Platform Interop Application Data Comm Windows DNA 2000Other Platforms Application Framework implementation Data Comm Core Standards Application Schemas Frameworks Platform/Tools Solutions and Applications Platform/Tools Solutions and Applications Framework implementation
Where is XML used? Sample XML Sample XML BU1032 The Busy Executive's Database Guide The Busy Executive's Database Guide An overview of available database systems with emphasis on common business applications. Illustrated. An overview of available database systems with emphasis on common business applications. Illustrated.
Getting Started XML must play by rules XML must play by rules XML Declaration Define Tags Add Data
VB and XML Wire into components Wire into components Use with serialization techniques Use with serialization techniques Move data into and out of components Generate XML from components Generate XML from components Send to ASP Generate from ASP and send to Generate from ASP and send to Browser Vendor Customer
XMLGen.Generator Custom VB XML Generator Custom VB XML Generator Simple No frills Designed to get data out Useful in intranet / Internet applications Where full parser not required
XMLGen.Generator Interface XMLDeclaration XMLDeclaration Format – formats data Format – formats data BeginTag – generates starting tag BeginTag – generates starting tag EndTag – generates ending tag EndTag – generates ending tag
Generating the Declaration Set output var to return value Set output var to return value vOutPut = oXML.XMLDeclaration() Results in this: Results in this:
Creating the XML Stream Call Format method to generate tags Call Format method to generate tags sTitle = oXML.Format("Title", rsTitle("title")) sID = oXML.Format("Title_ID", rsTitle("title_id")) sNotes = oXML.Format("Notes", rsTitle("notes")) sReturn = sID & sTitle & sNotes Return all XML as string from VB method Return all XML as string from VB method RetrieveTitle = sReturn
ADO and XML ADO 2.x can save RS as XML ADO 2.x can save RS as XML ADO 2.5 can save or stream RS as XML ADO 2.5 can save or stream RS as XML Use ADO to generate stream to other applications
ADO 2.5 Stream Object Stream object Stream object Can hold different types of data Load from ADO RS Feed to MSXML Parser
XML from ASP ADO 2.5 XML Support ADO 2.5 XML Support Generate XML from RS Send to Response object Use Customer Formatter Use Customer Formatter Why?
XML Mapping B2B or B2C requirements B2B or B2C requirements Map DB Schema to XML Should use XMLFilter object Handle mapping automatically Read XML Schema Map Schema to DB Schema Output XML Resist temptation to generate XML directly in Stored Procs or from database
Storing XML In Database Not easily searchable Not easily searchable Works best for self described data Works best for self described data Query definition, state info (non searchable) Watch column size Watch column size Be careful with varchar vs. char/int/etc.
HTML vs. XML Use HTML Files when Possible Use HTML Files when Possible Does note require script or XML processing Simple file / HTTP processing IIS 5 improves processing of ASP files with no script
Session Support Turn off Turn off Frees up resources on server Lets IIS process multithreaded applications faster How How Rework applications first (see FMStocks 1 & 2000 for sample code) Remove reference to Session vars Use the ISM to turn off on server
Session State Data Don’t use ASP session object Don’t use ASP session object Use XML to store state Use XML to store state Store data in SQL Server Store data in SQL Server
The Microsoft XML Engine Freely distributed Freely distributed Fast parser Fast parser Great for reading XML files Great for reading XML files Combine with ADO or other formatter Combine with ADO or other formatter
SQL Server SQL Server 2000 SQL Server 2000 Generate XML directly More…
With Browser IE 5 Data Islands IE 5 Data Islands Treat XML data as object Work with MSXML parser Interact with DHTML
With XSL With XSL XSL XSL Extensible Style Sheet Works with XML on client or server Used to transform XML data into something else
Your consent to our cookies if you continue to use this website.