Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

SharePoint Lists WebService Exception

  Asked By: Kayla Lewis         Date: May 03, 2008      Category: Sharepoint      Views: 360
 

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>"+
"</Method>";
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


Do you know someone who can help? Share a link to this thread on twitter, or facebook.

Tagged:        

 

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.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].