Die deutschsprachige Community für SharePoint, Microsoft 365, Teams, Yammer und mit Azure

Search in .xml files for spezial tag

bewertet von 0 Usern
Nicht beantwortet Dieser Beitrag hat 0 Geprüfte Antworten | 2 Antworten | 1 Follower

Ohne Rang
4 Beiträge
SP2013JL erstellt in 3 Jul 2013 10:56

Hello together,

i habe a problem with the SharePoint 2010 Search Service. Over the Search Service i want to search in .xml files for a xml tag, like this: <group groupId="21"> with C#.

My Code look like this:

SearchService.QueryServiceSoapClient query = new QueryServiceSoapClient(httpBinding, endpoint);

string innerAbfrage = "<group groupId=\"21\">";







string abfrage = "<QueryPacket xmlns='urn:Microsoft.Search/Query'>"

+ "<Query>"

+ "<Range>"

+ "<Count>100</Count>"

+ "</Range>"

+ "<Context>"

+ "<QueryText language='en-US' type='STRING'>" + innerAbfrage + "</QueryText>"

+ "</Context>"

+ "<Properties>"

+ "<Property name=\"Title\" ></Property>"

+ "<Property name=\"Path\" ></Property>"

+ "<Property name=\"Size\" ></Property>"

+ "</Properties>"

+ "</Query>"

+ "</QueryPacket>";

var res = query.Query(abfrage);


I think SP Search Service can't search for XML Tags, only for XML Content in XML Tags. But i need a Soloution to do this, have anyone a idea?

THX for help,





Alle Antworten

19.128 Beiträge

This is a german speaking site. If you prefer to ask questions in english you could use the Microsoft Forums at

Regarding your question: as you already stated yourself I don't think it's possible to actually search for xml elements or attributes, but if so you should escape the tags like this
string query = "&lt;group /&gt;";

Viele Grüße
af @ evocom de
Ohne Rang
4 Beiträge

Danke für die Info.


Zu dem Problem, die umformatierung der Sonderzeichen hat leider nicht funktioniert.

Hier wirft er jetzt nur den Fehler:

<ResponsePacket xmlns="urn:Microsoft.Search.Response"><Response domain=""><Status>ERROR_BAD_REQUEST</Status><DebugErrorMessage>An error occurred while parsing EntityName. Line 1, position 175.</DebugErrorMessage></Response></ResponsePacket>



Seite 1 von 1 (3 Elemente) | RSS