Using Visual Basic ® With The MSXML Parser Ken Spencer Vice President 32X Corporation www.32x.com6-310.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Advertisements

Integrating XML in Business Ken Spencer Vice President 32X Corporation
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
 2001 Prentice Hall, Inc. All rights reserved. 1.
1 XSLT – eXtensible Stylesheet Language Transformations Modified Slides from Dr. Sagiv.
XML & Data Structures for the Internet Yingcai Xiao.
XML and XSL Transforming your XML documents with eXtensible Stylesheet Language Transformations [Optional Lecture]
Supervised by Prof. LYU, Rung Tsong Michael Department of Computer Science & Engineering The Chinese University of Hong Kong Prepared by: Chan Pik Wah,
XSL Unit 6 November 2. XSL –eXtensible Stylesheet Language –Basically a stylesheet for XML documents XSL has three parts: –XSLT –XPath –XSL-FO.
XML Schema Describing the structure of XML documents. A very brief introduction 1XML Schema.
Future Directions for Leveraging Advanced XML Tools and Building Custom XML Solutions Denise Draper DAT321 Microsoft Corporation.
PHP and XML TP2653 Advance Web Programming. PHP and XML PHP5 – XML-based extensions, library and functionalities (current XAMPP PHP version is )
Advanced XSL Concepts Transforming External Data Sources Vinit Varghese Implementation Manager, OmniUpdate.
XML files (with LINQ). Introduction to LINQ ( Language Integrated Query ) C#’s new LINQ capabilities allow you to write query expressions that retrieve.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
Ajax (Asynchronous JavaScript and XML). AJAX  Enable asynchronous communication between a web client and a server.  A client is not blocked when an.
HTML DOM.  The HTML DOM defines a standard way for accessing and manipulating HTML documents.  The DOM presents an HTML document as a tree- structure.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
XSLT for Data Manipulation By: April Fleming. What We Will Cover The What, Why, When, and How of XSLT What tools you will need to get started A sample.
Representing Web Data: XML CSI 3140 WWW Structures, Techniques and Standards.
XP New Perspectives on XML, 2 nd Edition Tutorial 10 1 WORKING WITH THE DOCUMENT OBJECT MODEL TUTORIAL 10.
Posting XML Data From the Client to a Server Eugenia Fernandez IUPUI.
These Questions are copied from
CIS 375—Web App Dev II DOM. 2 Introduction to DOM The XML Document ________ Model (DOM) is a programming interface for XML documents. It defines the way.
XML Parsers Overview  Types of parsers  Using XML parsers  SAX  DOM  DOM versus SAX  Products  Conclusion.
Parsing with DOM using MSXML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
DOM Robin Burke ECT 360. Outline XHTML in Schema JavaScript DOM (MSXML) Loading/Parsing Transforming parameter passing DOM operations extracting data.
Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 4 - XML.
Working with the XML Document Object Model ©NIITeXtensible Markup Language/Lesson 7/Slide 1 of 44 Objectives In this lesson, you will learn to: *Identify.
The XML Document Object Model (DOM) Aug’10 – Dec ’10.
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 34 - Case Study: Active Server Pages and XML Outline 34.1 Introduction 34.2 Setup and Message.
XML DOM Functionality in.NET DSK Chakravarthy
1 Dr Alexiei Dingli XML Technologies XML Advanced.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 15 – Case Study: Message Forum with Active Server Pages Outline 15.1Introduction 15.2Setup and.
WORKING WITH XML IN THE.NET FRAMEWORK. Accessing an XML File Basic activities: open it, read it.NET Framework provides structured and unstructured mechanisms.
BizTalk Flat File Parsing Annotations. Flat File Parsing = LL(k) Parser The flat file parser is entirely grammar driven and is implemented as an LL(k)
CSD 340 (Blum)1 Making and Reading from XML Files Chapter 14 of Beginning JavaScript (Paul Wilton)
C# and Windows Programming XML Processing. 2 Contents Markup XML DTDs XML Parsers DOM.
Jennifer Widom XML Data Introduction, Well-formed XML.
CSE 6331 © Leonidas Fegaras XML Tools1 XML Tools.
1 Dr Alexiei Dingli XML Technologies SAX and DOM.
Introduction to the Document Object Model Eugenia Fernandez IUPUI.
XML Parser using JavaScript. 2 Microsoft To manipulate an XML document in javascript, you need an XML parser. Today all browsers come with in-built parsers.
 defined as Extensible Markup Language (XML) is a set of rules for encoding documents  Defines structure and data.
XML DOM.
XML Tools (Chapter 4 of XML Book). What tools are needed for a complete XML application? n Fundamental components n Web infrasructure n XML development.
Working with Elements and Attributes Using DOM Eugenia Fernandez IUPUI.
Document Object Model.  The XML DOM (Document Object Model) defines a standard way for accessing and manipulating XML documents.  The DOM presents an.
1 Whitespace Handling Roger L. Costello XML Technologies.
XML DOM  XML Document Object Model provides a robust international standard for XML Documents.  DOM Level 1 is a Dec 11, 1998 W3C recommendation.  XML.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
USING ANDROID WITH THE DOM. Slide 2 Lecture Summary DOM concepts SAX vs DOM parsers Parsing HTTP results The Android DOM implementation.
XML DOM Week 11 Web site:
Generating XML Data from a Database Eugenia Fernandez IUPUI.
XML Parsers Overview Types of parsers Using XML parsers SAX DOM
In this session, you will learn to:
Unit 4 Representing Web Data: XML
Introduction to the Document Object Model
Chapter 7 Representing Web Data: XML
Week 11 Web site: XML DOM Week 11 Web site:
Processing XML.
XML Parsers Overview Types of parsers Using XML parsers SAX DOM
XML Data Introduction, Well-formed XML.
In this session, you will learn to:
More Sample XML By Sadia Anjum.
JavaScript & jQuery AJAX.
XML and its applications: 4. Processing XML using PHP
XML and Web Services (II/2546)
Presentation transcript:

Using Visual Basic ® With The MSXML Parser Ken Spencer Vice President 32X Corporation

Cross-Platform Interop Application Data Comm Windows DNA 2000 Other Platforms Application Framework implementation Data Comm Core Standards Application Schemas FrameworksPlatform/Tools Solutions and Applications Platform/Tools Framework implementation

The Microsoft ® XML Engine Freely distributed Freely distributed  msdn.microsoft.com/downloads/webtechn ology/xml/msxml.asp Fast parser Fast parser Great for creating and reading XML data Great for creating and reading XML data  Files  Streams

Instantiating From ASP From ASP Dim xmlDoc Dim sXML Set xmlDoc = CreateObject("microsoft.xmldom") From Visual Basic From Visual Basic Dim xDoc As MSXML.DOMDocument Set xDoc = New MSXML.DOMDocument

Loading XML Data Stream Data Stream Data sXML = txtXML xmlDoc.async = False xmlDoc.loadXML (sXML) File Data File DataxmlDoc.Load("f:\data\customer01.xml")

Asynchronous Loading Async Property Async Property  Defaults to True  Requires checking readyState property  Returns 0 – 4  4 indicates load complete Setting Async Setting Async  xmlDoc.async = False  Sets to false, loading will be synchronous

Retrieving XML Data Extract the XML Extract the XML  txtOutput = xmlDoc.xml txtOuput txtOuput  Contains entire XML stream

Working With Nodes Understand NodeType property Understand NodeType property Node Type Example NODE_ELEMENT The Offspring The Offspring NODE_ATTRIBUTE The Offspring > The Offspring > NODE_TEXT The Offspring The Offspring NODE_PROCESSING_INSTRUCTI ON NODE_DOCUMENT_TYPE

Working With Nodes Retrieve elements by name Retrieve elements by name  getElementsByTagName Walk through children Walk through children  IXMLDOMNodeList  Check out DisplayNode

Searching For Nodes Search for node by name Search for node by name  Build nodelist  Use NextMode method to walk list  See cmdNextNode_Click

Extracting Attributes Use Attributes property Use Attributes property  Returns list of attributes  Returned in XMLDOMNamedNodeMap object  For nodeTypes of:  NODE_ELEMENT  NODE_ENTITY  NODE_NOTATION  getNamedItem will return attribute text  See cmdGetBookAttribute_Click

Creating XML Create an empty document Create an empty document  xmlDoc.loadXML " "  Loads the parser  Document is empty  Has one blank node (required)  Use appendChild to add nodes  Extract XML with XML property  See cmdCreateNode_Click

Where Now? Tip of the iceberg Tip of the iceberg XML is moving everywhere XML is moving everywhere MSXML MSXML  Works with XSL stylesheets and schmas  Much more under the hood References References  