nerdexam
Microsoft

70-433 · Question #15

Click the Exhibit button. You have the following XML: </Site> </Site> </Site> You are tasked to query the sites listed in the XML by using OPENXML. The results will have two columns, ParentSiteURL…

The correct answer is C. SELECT ParentSiteURL, SiteURL. DECLARE @XMLDocHandle int, @XMLDoc varchar(1000) =' --Create an internal representation of the XML document. EXEC sp_xml_preparedocument @XMLDocHandle OUTPUT, @XMLDoc SELECT ParentSiteURL, SiteURL FROM OPENXML (@XMLDocHandle, '//Site', 1) WITH ( ParentSiteURL nVarChar(512)…

Implement a desktop infrastructure

Question

Click the Exhibit button. You have the following XML:

</Site> </Site> </Site> You are tasked to query the sites listed in the XML by using OPENXML. The results will have two columns, ParentSiteURL and SiteURL. The ParentSiteURL column should contain the URL attribute of the parent site. The SiteURL column should contain the URL attribute of the site itself. The output should look like that in the exhibit. You need to write the OPENXML query. Which Transact-SQL statement should you use?

Exhibit

70-433 question #15 exhibit

Options

  • ASELECT ParentSiteURL, SiteURL
  • BSELECT ParentSiteURL, SiteURL
  • CSELECT ParentSiteURL, SiteURL
  • DSELECT ParentSiteURL, SiteURL

How the community answered

(62 responses)
  • A
    10% (6)
  • B
    2% (1)
  • C
    84% (52)
  • D
    5% (3)

Explanation

DECLARE @XMLDocHandle int, @XMLDoc varchar(1000) =' --Create an internal representation of the XML document. EXEC sp_xml_preparedocument @XMLDocHandle OUTPUT, @XMLDoc SELECT ParentSiteURL, SiteURL FROM OPENXML (@XMLDocHandle, '//Site', 1) WITH ( ParentSiteURL nVarChar(512) '../@URL', SiteURL nVarChar(512) '@URL')

Topics

#OPENXML#XML parsing#hierarchical data#SQL Server

Community Discussion

No community discussion yet for this question.

Full 70-433 Practice