Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

List Item Problem

  Asked By: Patrick    Date: Oct 10    Category: Sharepoint    Views: 921

I am trying to store an xml string into a list item (the column is
multiple line text). I am trying to add a string
like "<Record><ID>123</ID><Shipment_ID>xa-34</Shipment_ID></Record>."
When it adds the list item, it only adds "123xa-43." I am adding the
list item programmatically. Do I need to wrap this in CDATA somehow?



3 Answers Found

Answer #1    Answered By: Aditiya Kapale     Answered On: Oct 10

No sure about CDATA - how you tried to use "&lg" and "<" instead of "<" and
">"? Also I know that the "-" can cause issues. SharePoint 2003 does not like
this when dealing with SharePoint web services; never tried the "-" when dealing
with MOSS 2007.

Hope this helps.

Answer #2    Answered By: Faith Delgado     Answered On: Oct 10

I tried changing the string  to


But I am now getting an error "Data at the root level is invalid.
Line 1, position 1."

Has anyone tried programmatically  adding xml  text to a column  before?

Answer #3    Answered By: Selena Glenn     Answered On: Oct 10

Wrapping the xml  string in CDATA worked.

Didn't find what you were looking for? Find more on List Item Problem Or get search suggestion and latest updates.