Multiple choice technology databases

Which inbuilt SP is used to parse the values from XML document

  1. sp_xml_postdocument

  2. sp_xml_readdocument

  3. sp_xml_loaddocument

  4. sp_xml_preparedocument

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

sp_xml_preparedocument is the correct system stored procedure that parses an XML document and returns a handle that can be used with OPENXML. The other options are虚构的 names that don't exist in SQL Server. After use, the document handle should be freed with sp_xml_removedocument to avoid memory leaks.