Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How to create new list item using data from XML feed? Is it possible to handle multi line of text in XML feed?

share|improve this question

2 Answers 2

I'm not sure what is the full context of your data, but the way I see you either, create the actual list instance as part of your SharePoint solution where you could use

 <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <ListInstance Title="ListWithXml"                
                    TemplateType="10001"
                    Url="Lists/MyListName"
                    Description="This list gets default data">
        <Data>
          <Rows>
            <Row>
              <Field Name="Title">Title Item 01</Field>
              <Field Name="Notes">Lorem Ipsum dolor sitament....</Field>
            </Row>
            <Row>
              <Field Name="Title">Title Item 02</Field>
              <Field Name="Notes">Long field with content from long field</Field>
            </Row>
            <Row>
              <Field Name="Title">T</Field>
            </Row>
          </Rows>
        </Data>    
      </ListInstance>
    </Elements>
  1. Rely on some Event Receiver (eg. ListAdded event - see more explanations http://karinebosch.wordpress.com/walkthroughs/event-receivers-theory/) to read data from the XML upon List creation - via SharePoin Server-Side Object model

  2. Use any Client Side Object model to fill-in the list yourself, via some kind of Console Application. - If all depends on the structure of your XML, because you need to handle the actual mapping.

share|improve this answer

Solution 1 (Simplest):Just open the File with excel (File->Open choose xml) and paste to sharepoint list(data sheet view)

Solution 2 : Parse the xml yourself...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.