ratinakage
Programmer
Hey guys,
If you could run the following SQL command:
I am trying to extract two Addendum elements from the xml string.
DECLARE @string VARCHAR (50)
SET @string = '<Request><Addendum>Addendum1</Addendum><Addendum>Addendum2</Addendum></Request>'
DECLARE @xml_xml_ptr INT
EXEC sp_xml_preparedocument @xml_xml_ptr OUTPUT, @string
SELECT
Addendum
FROM
OPENXML (@xml_xml_ptr, '/Request')
WITH
(
Addendum VARCHAR(79) 'Addendum'
)
EXEC sp_xml_removedocument @xml_xml_ptr
The first error I get is: XML parsing error: The following tags were not closed: Request, Addendum. This seems like valid xml to me.
Any help would be much appreciated.
Thanks!
G
If you could run the following SQL command:
I am trying to extract two Addendum elements from the xml string.
DECLARE @string VARCHAR (50)
SET @string = '<Request><Addendum>Addendum1</Addendum><Addendum>Addendum2</Addendum></Request>'
DECLARE @xml_xml_ptr INT
EXEC sp_xml_preparedocument @xml_xml_ptr OUTPUT, @string
SELECT
Addendum
FROM
OPENXML (@xml_xml_ptr, '/Request')
WITH
(
Addendum VARCHAR(79) 'Addendum'
)
EXEC sp_xml_removedocument @xml_xml_ptr
The first error I get is: XML parsing error: The following tags were not closed: Request, Addendum. This seems like valid xml to me.
Any help would be much appreciated.
Thanks!
G