Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. The XML parse error 0xc00ce556 occurred on line number 1

The XML parse error 0xc00ce556 occurred on line number 1

Scheduled Pinned Locked Moved XML / XSL
sharepointdatabasexmlhelpannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vimalsoft Pty Ltd
    wrote on last edited by
    #1

    Good Day all I have an SP that is defined like this

    ALTER PROCEDURE [dbo].[sp_Constraints_Update] @xml ntext,
    @TTBLType varchar(5)

    AS

    set nocount on

    DECLARE @xmldoc int
    DECLARE @sql varchar(8000)

    -- In one long sql string do all of the following
    --Create an internal representation of the XML document.
    EXEC sp_xml_preparedocument @xmldoc OUTPUT, @xml

    if exists (select * from [tempdb].[dbo].sysobjects where id = object_id(N'[tempdb].[dbo].[#Constraints]'))
    drop table [#Constraints]

    -- turn the xml into a table with characteristics of the given table
    SELECT *
    INTO #Constraints
    FROM OPENXML ( @xmldoc , '/Root/Row' , 2)
    WITH (
    [ID] int, -- ID of the activitiy or contact (XM) to update
    DayOp char(7) 'Day_Action',
    [Day] int 'Day',
    SessOp char(7) 'Period_Action',
    Sess int 'Period'

    )
    

    EXEC sp_xml_removedocument @xmldoc

    --select * from #Constraints

    update #Constraints set [Day] = null where [Day] = 0 -- can't have [Day] <, = or > 0
    update #Constraints set [Sess] = null where [Sess] = 0 -- can't have [Day] <, = or > 0

    -- todo make this generic for class or exam
    update tbl_actv
    set [Day] = #Constraints.[Day],
    DayOp = case(#Constraints.[DayOp])
    when 'on' then '='
    when 'before' then '<'
    when 'after' then '>'
    end,
    Session = #Constraints.Sess,
    SessOp = case(#Constraints.[SessOp])
    when 'on' then '='
    when 'before' then '<'
    when 'after' then '>'
    end
    from #Constraints
    where #Constraints.ID = tbl_actv.ID

    and i have have tried to execute it like this

    exec sp_Constraints_Update 'EXAM','<Root><Row><ID>3</ID><Activity>ACC121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>15</Day><Period_Action>on</Period_Action><Period>15</Period></Row><Row><ID>9</ID><Activity>ADM121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>4</Day><Period_Action>on</Period_Action><Period>4</Period></Row><Row><ID>13</ID><Activity>ADM122 T1 [1]</Activity><Day_Action>on</Day_Action><Day>1</Day><Period_Action>on</Period_Action><Period>7</Period>&l

    D 1 Reply Last reply
    0
    • V Vimalsoft Pty Ltd

      Good Day all I have an SP that is defined like this

      ALTER PROCEDURE [dbo].[sp_Constraints_Update] @xml ntext,
      @TTBLType varchar(5)

      AS

      set nocount on

      DECLARE @xmldoc int
      DECLARE @sql varchar(8000)

      -- In one long sql string do all of the following
      --Create an internal representation of the XML document.
      EXEC sp_xml_preparedocument @xmldoc OUTPUT, @xml

      if exists (select * from [tempdb].[dbo].sysobjects where id = object_id(N'[tempdb].[dbo].[#Constraints]'))
      drop table [#Constraints]

      -- turn the xml into a table with characteristics of the given table
      SELECT *
      INTO #Constraints
      FROM OPENXML ( @xmldoc , '/Root/Row' , 2)
      WITH (
      [ID] int, -- ID of the activitiy or contact (XM) to update
      DayOp char(7) 'Day_Action',
      [Day] int 'Day',
      SessOp char(7) 'Period_Action',
      Sess int 'Period'

      )
      

      EXEC sp_xml_removedocument @xmldoc

      --select * from #Constraints

      update #Constraints set [Day] = null where [Day] = 0 -- can't have [Day] <, = or > 0
      update #Constraints set [Sess] = null where [Sess] = 0 -- can't have [Day] <, = or > 0

      -- todo make this generic for class or exam
      update tbl_actv
      set [Day] = #Constraints.[Day],
      DayOp = case(#Constraints.[DayOp])
      when 'on' then '='
      when 'before' then '<'
      when 'after' then '>'
      end,
      Session = #Constraints.Sess,
      SessOp = case(#Constraints.[SessOp])
      when 'on' then '='
      when 'before' then '<'
      when 'after' then '>'
      end
      from #Constraints
      where #Constraints.ID = tbl_actv.ID

      and i have have tried to execute it like this

      exec sp_Constraints_Update 'EXAM','<Root><Row><ID>3</ID><Activity>ACC121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>15</Day><Period_Action>on</Period_Action><Period>15</Period></Row><Row><ID>9</ID><Activity>ADM121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>4</Day><Period_Action>on</Period_Action><Period>4</Period></Row><Row><ID>13</ID><Activity>ADM122 T1 [1]</Activity><Day_Action>on</Day_Action><Day>1</Day><Period_Action>on</Period_Action><Period>7</Period>&l

      D Offline
      D Offline
      DoctorMick
      wrote on last edited by
      #2

      I might be missing something but you appear to have your parameters the wrong way around, 'EXAM' should be after the XML string not before.

      V 1 Reply Last reply
      0
      • D DoctorMick

        I might be missing something but you appear to have your parameters the wrong way around, 'EXAM' should be after the XML string not before.

        V Offline
        V Offline
        Vimalsoft Pty Ltd
        wrote on last edited by
        #3

        Am Sorry its one of the days. Thanks its working :)

        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups