When i try to read the attached xml file using the following commands
DECLARE @XMLDocPointer INT
EXEC sp_xml_preparedocument @XMLDocPointer OUTPUT, 'C:\Export1\med_Form.xml'
SELECT * FROM OPENXML(@XMLDocPointer,'/med_Form/medFormID',2 )
I get error
The XML parse error 0xc00ce556 occurred on line number 1, near the XML text "C:\Export1\Alchemy_Form.xml".
Msg 6602, Level 16, State 2, Procedure sp_xml_preparedocument, Line 1
The error description is 'Invalid at the top level of the document.'.
Can someone help please with that, i need to read all contents of that file into a database table.