Xml query giving the error when the dhtml grid is loaded

string strPlaceCode = string.Empty;

string strXMLPlace = HttpContext.Current.Server.MapPath("~/XML/Monuments.xml");

string strNavNamePlace = “data”;

XQueryNavigatorCollection navcolPlaces = new XQueryNavigatorCollection();

XmlDocument xDocPlace = new XmlDocument();


navcolPlaces.AddNavigator(xDocPlace.CreateNavigator(), strNavNamePlace);

string strXQuery = “{FOR $searchPlace in document(‘data’)/data/entrances where $searchPlace/placeName=’” + pstrPlaceName.Trim() + “’ RETURN $searchPlace/placeId }”;

XQueryExpression xexpr = new XQueryExpression(strXQuery);

string resultXML = xexpr.Execute(navcolPlaces).ToXml();

DataSet ds = new DataSet();

ds.ReadXml(new StringReader(resultXML));

Error Is ::::----

‘(’ expected. Maybe you are using a known function name like last, data, text etc as an identifier. For this release , this is not allowed.


my xml Format is





<monument_name>Taj Mahal</monument_name>

<rates_in>BOTH (USD/INR)</rates_in>




Rates for foriener details = 15$ for adult and 10$ for child. Night view allowed between 2030 to 0030hrs. maximam 8 batch of 50 pax allowed for the evening duration 30 minute.

sunrise to 19:00hrs



The problem is not related to component.

>>Maybe you are using a known function name like last, data,