0
string queryText = string.Format(@"<Where>
                <And>    
                <Neq><FieldRef Name='EventType' /><Value Type='recurrence'>3</Value> </Neq> 

                <And>  
                    <Eq><FieldRef Name='fRecurrence'/><Value Type='Recurrance'>True</Value></Eq>
                    <And>  
                      <Geq><FieldRef Name='EndDate' /><Value Type='DateTime'>{0}</Value></Geq>
                      <Leq><FieldRef Name='StartDate' /><Value Type='DateTime'>{0}</Value></Leq> 
                    </And>     
                </And>

            </And>
           </Where> ", new DateTime(selectedDate.Year, selectedDate.Month, selectedDate.Day).ToString("yyyy-MM-dd"));

This is ndQuery of type XmlNode used in sharepoint to filter GetListItem in Windows. Want to do the same in WP8 but it doesnot support Xml, which use XElement so please convert this xml to XElement. Thanks in advance.

Lekshmi
  • 13
  • 3

2 Answers2

0

Just use:

var element = XElement.Parse(queryText);
Pedro Lamas
  • 7,185
  • 4
  • 27
  • 35
  • When I tried this (var element = XElement.Parse(queryText);) error occured saying "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown." – Lekshmi Apr 04 '13 at 11:19
  • 2
    @Lekshmi The error must be occurring on another line. There's no way `XElement.Parse` could throw a Sharepoint related exception. – Kevin Gosse Apr 04 '13 at 12:33
  • @KooKiz- Actually when I give the parameter element in "var element = XElement.Parse(queryText);", the above said error occurs. If I pass null instead I'm getting all the data from sharepoint without filtering. – Lekshmi Apr 05 '13 at 03:28
0

My problem got solved. thanks of all valuable replies. The above error occur due to insufficient data in sharepoint.

Lekshmi
  • 13
  • 3