Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 987 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
987
Dung lượng
15,77 MB
Nội dung
www.it-ebooks.info XMLProgrammingBible Brian Benz with John R. Durant a538292 FM.qxd 8/18/03 8:43 AM Page iii www.it-ebooks.info a538292 FM.qxd 8/18/03 8:43 AM Page ii www.it-ebooks.info XMLProgrammingBible a538292 FM.qxd 8/18/03 8:43 AM Page i www.it-ebooks.info a538292 FM.qxd 8/18/03 8:43 AM Page ii www.it-ebooks.info XMLProgrammingBible Brian Benz with John R. Durant a538292 FM.qxd 8/18/03 8:43 AM Page iii www.it-ebooks.info XMLProgrammingBible Published by Wiley Publishing, Inc. 909 Third Avenue New York, NY 10022 www.wiley.com Copyright (c) 2003 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada Library of Congress Cataloging-in-Publication Data: 2003101925 ISBN: 0-7645-3829-2 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 1O/QT/QZ/QT/IN No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8700. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, E-Mail: permcoordinator@wiley.com. is a trademark of Wiley Publishing, Inc. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: WHILE THE PUBLISHER AND AUTHOR HAVE USED THEIR BEST EFFORTS IN PREPARING THIS BOOK, THEY MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS BOOK AND SPECIFICALLY DISCLAIM ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES REPRESENTATIVES OR WRITTEN SALES MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR YOUR SITUATION. YOU SHOULD CONSULT WITH A PROFESSIONAL WHERE APPROPRIATE. NEITHER THE PUBLISHER NOR AUTHOR SHALL BE LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER COMMERCIAL DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR OTHER DAMAGES. For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Trademarks: Wiley, the Wiley logo, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book. a538292 FM.qxd 8/18/03 8:43 AM Page iv www.it-ebooks.info About the Authors Brian Benz (bbenz@benztech.com) has more than 15 years experience designing and deploying systems infrastructures, designing and developing applications, migrating messaging systems and applications, and managing projects. He has established his expertise and reputation in the XML and Web service marketplace since 1998 through hands-on experience in various projects. Brian also makes frequent contributions as a writer for industry publications, including the IBM Redbook XML: Powered by Domino, The Notes and Domino 6 Programmer’s Bible, Lotus Advisor magazine, e-Business Advisor magazine, WebSphere Advisor maga- zine, and e-Pro magazine. He is also a frequent presenter of highly rated technical seminars for IBM, Lotus Software, and Advisor Media at venues worldwide. Brian is CEO of Benz Technologies ( http://www.benztech.com). John R. Durant ( jdurant@microsoft.com) is the site manager for Microsoft’s Office Developer Center ( http://msdn.microsoft.com/office). He is a noted author and speaker on Microsoft Office, Microsoft .NET, XML, Microsoft SharePoint, COM technologies, and enterprise development. He has authored magazine articles, courseware, and other materials on these same topics, and has traveled the world speaking to developers and other professionals about how these technologies work. Before joining Microsoft, he was employed independently, delivering customer solutions. He lives in the Seattle area with his beautiful wife and four boys. Contributor Tod Golding has been a professional programmer since 1986 working in a variety of roles ranging from Software Engineer to Lead Architect for organiza- tions of all shapes and sizes, including Microsoft and Borland. His programming skills span the spectrum of technologies and programming languages and include designing and constructing large-scale systems using both the Microsoft and Java (J2EE) platforms. His language experience has focused primarily on C++, Java, and C#. His chapters in this book cover Java Web Services, the details of Apache’s Axis, JAX-RPC, and JAXM. He started his writing career as a journalist, writing sports for 2 years at the Sacramento Bee daily newspaper, and he has authored a number of white papers assessing the relative strengths of competing technologies. a538292 FM.qxd 8/18/03 8:43 AM Page v www.it-ebooks.info Credits Executive Editor Chris Webb Senior Acquisitions Editor Sharon Cox Acquisitions Editor Jim Minatel Project Editor Kenyon Brown Technical Editor Sundar Rajan Copy Editor Anne L. Owen Editorial Manager Mary Beth Wakefield Vice President & Executive Group Publisher Richard Swadley Vice President and Executive Publisher Bob Ipsen Executive Editorial Director Mary Bednarek Project Coordinator Kristie Rees Graphics and Production Specialists Amanda Carter Jennifer Click Sean Decker Michael Kruzil Lynsey Osborn Quality Control Technicians JohnTyler Connoley John Greenough Carl William Pierce Kathy Simpson Brian H. Walls Proofreading and Indexing TECHBOOKS Production Services a538292 FM.qxd 8/18/03 8:43 AM Page vi www.it-ebooks.info Dedicated to Hans Benz (1941-2003), father, son, brother, and storyteller —Brian Benz Dedicated to Jack T. and Teresa E. Durant —John R. Durant a538292 FM.qxd 8/18/03 8:43 AM Page vii www.it-ebooks.info [...]... xxix xxx XMLProgrammingBible Part IV: Relational Data and XML 429 Chapter 18: Accessing and Formatting XML from SQL Server Data 431 The XMLProgrammingBible Example Tables Installing and Configuring SQLXML Viewing XML Results in Query Analyzer Accessing SQL Server Using HTTP Retrieving XML Data Using FOR XML ... Formatting XML from DB2 509 Installing DB2 and the DB2 XML Extender The XMLProgrammingBible Example Tables DB2 XML Functions Adding an XML document declaration Grouping and ordering XML with XMLAGG() www.it-ebooks.info 509 510 513 519 520 Contents Developing XML Solutions with the DB2 XML Extender... 29 An Example XML Document XML Document Structure and Syntax Empty elements XML housekeeping Entity references and special characters www.it-ebooks.info 29 32 36 36 37 xxvi XMLProgrammingBible International XML with xml: lang Keeping Your Space with xml: space XML Namespaces... scratch using several different XML technologies www.it-ebooks.info x XMLProgrammingBible Part I: Introducing XML This section starts with an XML concepts chapter that gives an overview and history of XML, its purposes, and comparisons against previous and alternative data integration technologies We then proceed to describe XML basic formats, XML well-formedness, and XML validation against DTDs and... Formatting XML from SQL Server Data covers the FOR XML T-SQL extension, adding XML documents to a database, handling the data from the document as relational data set using OPENXML, and using XPath expressions to retrieve that data as XML documents Chapter 19: Accessing and Formatting XML from Oracle Data covers working with SQL /XML and Oracle XML functions using Oracle XML DB We also introduce you to the XMLType... colleagues what XML is, but you would be hard-pressed to be able to develop a practical XML solution In addition, very few books provide practical examples of both XML and Web service solutions on both the J2EE and MS platforms Programmers would most likely have to buy a minimum of four other books to match the same content that is found in the XMLProgrammingBible The XMLProgrammingBible is a comprehensive... and Formatting XML from Oracle Data 473 The XMLProgrammingBible Example Tables Installing and Configuring the Oracle Database and the Oracle XDK About Oracle XML DB About the Oracle XDK Developing Oracle XML Solutions with XML DB Working with XML DB Working with multiple data rows using XML DB ... of XML data using XML via working examples Part I ends with examples of parsing XML documents, including examples of XML parsing using SAX and DOM Chapter 1: XML Concepts provides readers who are new to XML with an overview and history of XML, its purposes, and comparisons against previous and alternative integration technologies We end the chapter with an introduction to the next XML version, XML. .. process called XML validation Chapter 4: XML Parsing Concepts covers techniques for integrating XML data with existing applications XML document parsing identifies and converts XML elements contained in an XML document into either nested nodes in a tree structure or document events, depending on the type of XML parser that is being used This chapter will focus on the concepts and theory behind XML document... The XMLPBWebServletGetAuthorList Servlet The XMLPBWebServletAppGetSingleAuthorList Servlet The XMLPBWebServletBuildElementXML Servlet The XMLPBWebServletBuildAttributeXML Servlet A Multi-Tier Java Application Installing the XMLPBServletApp Java Application Under the Hood of the Multi-Tier Application Servlets The XMLPBAppServletGetAuthorList . found in the XML Programming Bible. The XML Programming Bible is a comprehensive guide to architectural concepts and programming techniques for XML. We cover the mainstream industry XML and Web. 8:43 AM Page ii www.it-ebooks.info XML Programming Bible Brian Benz with John R. Durant a538292 FM.qxd 8/18/03 8:43 AM Page iii www.it-ebooks.info XML Programming Bible Published by Wiley Publishing,. www.it-ebooks.info XML Programming Bible Brian Benz with John R. Durant a538292 FM.qxd 8/18/03 8:43 AM Page iii www.it-ebooks.info a538292 FM.qxd 8/18/03 8:43 AM Page ii www.it-ebooks.info XML Programming Bible a538292