Download presentation
Presentation is loading. Please wait.
Published byAnastasia Ferguson Modified over 9 years ago
2
Exploring Microsoft® Office 2003 - Grauer and Barber 1 Committed to Shaping the Next Generation of IT Experts. Robert Grauer and Maryann Barber Using XML with Microsoft® Office 2003
3
Exploring Microsoft® Office 2003 - Grauer and Barber 2 Our intent is to provide an overview of XML and its implementation in Microsoft Office 2003; it is not a course in XML or InfoPath Objectives Define XML; explain how XML differs from HTML. Describe the XML syntax; create an XML document using the Notepad accessory. Explain how Internet Explorer is XML-enabled and how Notepad is not. Map a Word document to an XML schema. Import and refresh XML data into an Excel worksheet. Import XML data into an Access database; export an Access query as an XML file. Modify an XML document to reference a schema and a style sheet. Describe the purpose of Microsoft Office InfoPath 2003.
4
Exploring Microsoft® Office 2003 - Grauer and Barber 3 What is XML? XML (eXtensible Markup Language) is an industry standard for structuring data across applications, operating systems, and hardware devices Latest of evolution of Markup Languages SGML – Standardized General Markup Language HTML – Hypertext Markup Language XML is “data about data” i.e., it describes the data and not the formatting
5
Exploring Microsoft® Office 2003 - Grauer and Barber 4 So What is a Markup Language? Rich Text HTML XML 2 bedroom/2 bath – $600 per month – (305) 111-2222 2 bedroom/2 bath $600 per month (305) 111-2222 2 bedroom/2 bath – $600 per month – (305) 111-2222
6
Exploring Microsoft® Office 2003 - Grauer and Barber 5 XML tags are created by the user Define additional tags as you need them What is eXtensible? 2 bedroom/2 bath Immediate Occupancy $600 per month Swimming pool; close to campus (305)111-2222 1 month
7
Exploring Microsoft® Office 2003 - Grauer and Barber 6 A Simple XML Editor Notepad can be used to create and edit XML XML specification (optional) Comment statement Root element permits multiple occurrences of Apartment element within one document XML tags have element name between brackets and are case sensitive; the ending tag has a slash in front of the name
8
Exploring Microsoft® Office 2003 - Grauer and Barber 7 Internet Explorer is XML-Aware Plus and minus signs show collapsed and expanded elements Nested elements are indented for ease of understanding Data is in bold face XML tags are in color
9
Exploring Microsoft® Office 2003 - Grauer and Barber 8 An Iterative Process Create document in Notepad, then view document in Internet Explorer Open editor to modify document Click Refresh button to view updated document Enter and save the changes
10
Exploring Microsoft® Office 2003 - Grauer and Barber 9 Errors are Not Permitted Internet Explorer will not open a document with errors XML tags are case sensitive; these tags do not match Open editor to correct the error Enter, then save the changes, and then click Refresh button to see document in Internet Explorer Explanation of the error is provided
11
Exploring Microsoft® Office 2003 - Grauer and Barber 10 There is a Better Way... InfoPath 2003 enables a developer to create XML forms in the familiar Office environment Underlying schema is displayed in a task pane
12
Exploring Microsoft® Office 2003 - Grauer and Barber 11 InfoPath 2003 – User View The user enters data into a form which is converted to an XML document InfoPath is included in the Office 2003 Enterprise edition, but not in Office Professional; see office.microsoft.com/infopath for additional information
13
Exploring Microsoft® Office 2003 - Grauer and Barber 12 Microsoft Word... Multiple résumés are received by an organization, but cannot be processed electronically The solution is to convert the documents to XML, then process the results in an application where you can search and select for specific requirements
14
Exploring Microsoft® Office 2003 - Grauer and Barber 13 Schema is Created Independently Data type is specified; e.g., years are integer numbers Required elements Creating a schema is a course unto itself; our purpose is not to describe the detailed design, but rather to make you aware of its function and overall layout
15
Exploring Microsoft® Office 2003 - Grauer and Barber 14 Attach the Schema Pull down Tools menu, click Templates and Add-Ins command Indicate path of the schema Contents of the résumé will be checked against schema requirements The same schema can be attached to multiple documents
16
Exploring Microsoft® Office 2003 - Grauer and Barber 15 Map the Document XML Structure pane XML tags are nested within one another The Name element is the parent of the FirstName and LastName elements
17
Exploring Microsoft® Office 2003 - Grauer and Barber 16 Save the XML Document Specify XML as file type Save data only
18
Exploring Microsoft® Office 2003 - Grauer and Barber 17 The XML Document Reference to the schema Plus and minus signs show collapsed and expanded elements Internet Explorer is XML-aware
19
Exploring Microsoft® Office 2003 - Grauer and Barber 18 Microsoft Excel – Import XML Data XML Source pane displays the schema and previews data XML data is imported as a list
20
Exploring Microsoft® Office 2003 - Grauer and Barber 19 Analyze the Data... PercentOfGoal field is added Conditional formatting is used to highlight employees who make goal Company totals are also calculated Pivot table provides additional analysis
21
Exploring Microsoft® Office 2003 - Grauer and Barber 20 View the Pivot Table Pivot table displays totals for each city Click Refresh button if underlying data changes Worksheet tabs are colored
22
Exploring Microsoft® Office 2003 - Grauer and Barber 21 Update the Data in XML View original XML document Click to edit document Change the data; e.g., to 3100000 Save modified document Click Refresh button to see updated data This value will change
23
Exploring Microsoft® Office 2003 - Grauer and Barber 22 Refresh the Data Right click anywhere within the list to display context- sensitive menu Refresh the data
24
Exploring Microsoft® Office 2003 - Grauer and Barber 23 Microsoft Access – Import XML Table
25
Exploring Microsoft® Office 2003 - Grauer and Barber 24 Create a Query from both Tables Run the query Dynaset displays the results of the query
26
Exploring Microsoft® Office 2003 - Grauer and Barber 25 Export the Query as XML Location of the XML document
27
Exploring Microsoft® Office 2003 - Grauer and Barber 26 Three Separate Documents XML document has references to a schema and a style sheet The style sheet is created in Notepad
28
Exploring Microsoft® Office 2003 - Grauer and Barber 27 Add Reference to Style Sheet Open XML editor No reference to a style sheet and hence data is unformatted Add reference to style sheet
29
Exploring Microsoft® Office 2003 - Grauer and Barber 28 The Data is Formatted XML document can be stored locally Click Refresh button to view updated document
30
Exploring Microsoft® Office 2003 - Grauer and Barber 29 Return to Apartment Listings...
31
Exploring Microsoft® Office 2003 - Grauer and Barber 30 It is a Mail Merge... The main document (form letter) The data source
32
Exploring Microsoft® Office 2003 - Grauer and Barber 31 With One Hitch Microsoft Word does not recognize XML as a data source (you will have to ask Microsoft for the reason) One solution is to start Access, import the XML document into a new database, and then use that database as the data source for the mail merge Pull down File menu to Get External Data Select Apartment Listings XML document and click Import button
33
Exploring Microsoft® Office 2003 - Grauer and Barber 32 Set Access as Data Source Locate data source Select newly created Access database and click the Open button
34
Exploring Microsoft® Office 2003 - Grauer and Barber 33 Complete the Mail Merge Click Next to create the merged document Mail Merge toolbar appears automatically when data source is added Mail merge fields are added to the document Merged document is a separate file
35
Exploring Microsoft® Office 2003 - Grauer and Barber 34 In Conclusion... XML (eXtensible Markup Language) is a public standard and freely available. The XML syntax, known officially as the XML recommendation, was developed by the World Wide Web Consortium (commonly known as W3C), a public organization with the sole purpose of creating standards or recommendations for the Internet. The creation of the standards is an open process and any individual or company can join and participate. (W3C also published the HTML specification.) You can learn more about the organization and its standards by visiting their Web site at www.w3.org.www.w3.org
36
Exploring Microsoft® Office 2003 - Grauer and Barber 35 rgrauer@miami.edu www.prenhall.com/grauer
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.