Microsoft KB Archive/318910

= XML Programming Core Reference Comments and Corrections =

Article ID: 318910

Article Last Modified on 8/5/2004

-

APPLIES TO


 * MSPRESS XML Programming Core Reference ISBN 0-7356-1185-8

-



This article was previously published under Q318910



SUMMARY
This article contains comments, corrections, and information about known errors relating to the Microsoft Press book XML Programming Core Reference, ISBN 0-7356-1185-8.

The following topics are covered:


 * CD-ROM: Ch04 Code Sample openxml.sql Change
 * Page 7: &quot;XTML&quot; Should Be &quot;XHTML&quot;
 * Page 97: Missing Column Name In SELECT Statement
 * Page 98: Incorrect Dept_ID In Table
 * Page 130: Replace Code in Listing 4-27
 * Page 140: Line Missing From Results of Listing 4-32
 * Page 196: Document Element Incorrectly Repeated In Listing 5-10
 * Page 343: Definition For Address-Object Missing



CD-ROM: Ch04 Code Sample openxml.sql Change
The final line of code in the code sample openxml.sql, found in the ch04 directory, is incorrect. A replacement file is available for download.

In the attached file,

EXEC sp_xml_removeDocument @hXmlDoc

has been changed to:

EXEC sp_xml_removeDocument @xmlHnd

The following file is available for download from the Microsoft Download Center:

openxml.exe

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Page 7: &quot;XTML&quot; Should Be &quot;XHTML&quot;
On page 7, change the section heading:

&quot;XML Compared to XTML&quot;

To:

&quot;XML Compared to XHTML&quot;

Page 97: Missing Column Name In SELECT Statement
On page 97, in the first code sample, the column name Employee_ID is missing.

Change:

SELECT CONCATENATE( LastName,  ' ', FirstName ) AS Fullname FROM Employee WHERE LastName = 'Jordan' To:

SELECT Employee_ID, (LastName + ', ' + FirstName ) AS Fullname FROM Employee WHERE LastName = 'Jordan'

Note: CONCATENATE is not a standard function in all RDBMS, and you should use the &quot;+&quot; operator for Microsoft SQL Server and &quot;||&quot; for Oracle to concatenate the last name and first name values.

Page 98: Incorrect Dept_ID In Table
On page 98, in the table at the top, in the fourth row,

Change:

&quot;Dept_ID

3&quot;

To:

&quot;Dept_ID

2&quot;

And in the fifth row,

Change:

&quot;Dept_ID

4&quot;

To:

&quot;Dept_ID

3&quot;

Page 130: Replace Code in Listing 4-27
On page 130, in listing 4-27, change the final line of code from:

EXEC sp_xml_removeDocument @hXmlDoc To:

EXEC sp_xml_removeDocument @xmlHnd

Page 140: Line Missing From Results of Listing 4-32
The expected results table shown on page 140 is missing a row. Add the following row for record 10 as the last row of the output (column headings given for reference):

Page 196: Document Element Incorrectly Repeated In Listing 5-10
On pages 195-196, in listing 5-10, the section of code from the first line to the tag on page 196 (line 6) should be removed.

The listing should begin with line 7 on page 196.

Page 343: Definition For Address-Object Missing
On page 343, the definition for the Address-Object is missing, and as a result the creation of an instance is not complete and does not lead to the XML code in the next section (The Object Instance XML Document).

Add the following lines of code beneath the call to the Person constructor:

Person p = new Person(&quot;John&quot;, &quot;Smith&quot;, &quot;11/30/1974&quot;, &quot;brown&quot;, &quot;blue&quot;); p.address.setAddress1(&quot;200 Brattle Street&quot;); p.address.setCity(&quot;Cambridge&quot;); p.address.setState(&quot;MA&quot;); p.address.setZip(&quot;02138&quot;);

Microsoft Press is committed to providing informative and accurate books. All comments and corrections listed above are ready for inclusion in future printings of this book. If you have a later printing of this book, it may already contain most or all of the above corrections.

Additional query words: 0-7356-1185-8 WYKE REHMAN LEUPEN XML DEVBOOK

Keywords: kbinfo kbdownload kbdocfix kbdocerr KB318910

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.