SPQuery: Difference between Query and ViewXml properties?

Hi, SharePoint Developers!

I cannot deeply understand the difference between the Query and ViewXml properties in an SPQuery object. The msdn documentation says:

  • Inquiry. Gets or sets the internal XML code. used in the request.
  • ViewXml: Gets or sets the XML schema that defines the view.

it seems to me that ViewXml is suitable for filtering the fields you want to get ... I'm not sure.

And what's the difference? In what situations should we choose the first after the second? How SharePoint handles these requests. The mystery remains for me, so what if someone can shed light on her? thank...

+3
source share
1 answer

ViewXml . Query, ViewFields, RowLimit . SPQuery (Query, ViewFields, RowLimit ..), ViewXml . , SPQuery, ViewXml. ViewXml , (, , SPQuery).

+3

Source: https://habr.com/ru/post/1790457/


All Articles