Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

SharePoint Lists WebService Exception

  Asked By: Kayla    Date: May 03    Category: Sharepoint    Views: 1778

had anybody came across the follwoing error

The '<' character, hexadecimal value 0x3C, cannot be included in a
name.System.Xml at System.Xml.XmlDocument.CheckName(String name) at
System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc) at
System.Xml.XmlDocument.CreateElement(String prefix, String localName, String
namespaceURI) at System.Xml.XmlDocument.CreateElement(String name)

here is the code

string xnUpdate = "<Method ID='1' Cmd='New'>"+
"<Field Name='Topic'> SomeTopic </Field>"+
"<Field Name='Body'> Description123</Field>"+
XmlElement elBatch = xmlDoc.CreateElement(xnUpdate); ---->getting the error on
this line only

elBatch.SetAttribute("OnError", "Continue");
elBatch.SetAttribute("ListVersion", "0");
elBatch.SetAttribute("ViewName", list.DefaultView.ToString());
XmlNode xn = lst.UpdateListItems(list.Title.ToString(), elBatch);

My aim is to update the Custom list with a new list item



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on SharePoint Lists WebService Exception Or get search suggestion and latest updates.