Is there a quick way to do this? If I receive an 'empty' XML fragment eg <Candidates></Candidates> - return, or else process the data inside.
Logic vastly reduced - so what I'm asking for is a quick way to see if XML = '<Candidates></Candidates>' in a SQL stored PROC.
Logic vastly reduced - so what I'm asking for is a quick way to see if XML = '<Candidates></Candidates>' in a SQL stored PROC.
Thanks,
Doug
CREATE PROCEDURE [dbo].[Receive_XML] ( @CandidateXML XML ) AS BEGIN SET NOCOUNT ON; IF NULLIF( CAST( @CandidateXML AS NVARCHAR), N'<Candidates></Candidates>' ) IS NOT NULL BEGIN -- Do Processing END ELSE BEGIN -- Return - nothing to process END END
