一部の結果をWebパーツに書き込むために、Microsoft Office SharePoint Server Search Serviceにクエリを実行しています。私は正しくクエリが動作しているが、JQuery経由でXMLレスポンスを解析する際に問題が発生しています。以下はJQueryを使用したXMLの解析
は私がTITLEすなわちスミス、ジョセフとjQueryを使用してJOBTITLEすなわちプログラマーを取得しようとしているXML応答
<ResponsePacket xmlns="urn:Microsoft.Search.Response">
<Response domain="QDomain">
<Range>
<StartAt>1</StartAt>
<Count>1</Count>
<TotalAvailable>1</TotalAvailable>
<Results>
<Document xmlns="urn:Microsoft.Search.Response.Document">
<Action>
<LinkUrl fileExt="aspx">https://mysite.domain.inc:443/Person.aspx?guid=4A4F27E2 9C99 4866 BB08 DE494475A4E7</LinkUrl>
</Action>
<Properties xmlns="urn:Microsoft.Search.Response.Document.Document">
<Property>
<Name>TITLE</Name>
<Type>String</Type>
<Value>Smith, Joseph</Value>
</Property>
<Property>
<Name>RANK</Name>
<Type>Int64</Type>
<Value>873</Value>
</Property>
<Property>
<Name>SIZE</Name>
<Type>Int64</Type>
<Value>0</Value>
</Property>
<Property>
<Name>DESCRIPTION</Name>
<Type>String</Type>
<Value>Hi guys!</Value>
</Property>
<Property>
<Name>WRITE</Name>
<Type>DateTime</Type>
<Value>2009 07 31T03:00:24 04:00</Value>
</Property>
<Property>
<Name>PATH</Name>
<Type>String</Type>
<Value>https://mysite.domain.inc:443/Person.aspx?guid=4A4F27E2 9C99 4866 BB08 DE494475A4E7</Value>
</Property>
<Property>
<Name>JOBTITLE</Name>
<Type>String</Type>
<Value>Programmer</Value>
</Property>
</Properties>
</Document>
</Results>
</Range>
<Status>SUCCESS</Status>
</Response>
</ResponsePacket>
です。
は、私が使用を開始:
$(xml).find('Properties').each(function(){
//not sure how to get the ones I want, use an indexer?
});
作り付けの検索、Sharepointのに組み込まれた古いASMXスタイルのWebサービスです。そうでない場合は、このコードを動作させるために$(xml)を実行する必要があります。ありがとう。 – SolutionYogi
今更新する –