(この質問は、以前にstackoverflowに投稿した以前の質問に関連しています...ここにリンクがあります
この特定のシナリオでは、XPath、SAX、または DOM を使用して XML ファイルから値を抽出する)
問題は、上記の場合を念頭に置いて、文章を取得するのではなく、各参加者が書いた単語をすべての文章で取得したい場合です。例えば。「Budget」という単語が合計 10 回使用され、参加者「Dolske」が 7 回、他の人が 3 回使用した場合。それでは、すべての単語のリストが必要で、各参加者が何回書いたのでしょうか? また、各ターンの単語のリストは?
これを達成するための最良の戦略は何ですか?サンプルコードはありますか?
XML はここに添付されています (参照されている質問でも確認できます)。
「(495584) Firefox - 検索候補が間違った前の結果をフォーム履歴に渡す」
<Turn>
<Date>'2009-06-14 18:55:25'</Date>
<From>'Justin Dolske'</From>
<Text>
<Sentence ID = "3.1"> Created an attachment (id=383211) [details] Patch v.2</Sentence>
<Sentence ID = "3.2"> Ah. So, there's a ._formHistoryResult in the....</Sentence>
<Sentence ID = "3.3"> The simple fix it to just discard the service's form history result.</Sentence>
<Sentence ID = "3.4"> Otherwise it's trying to use a old form history result that no longer applies for the search string.</Sentence>
</Text>
</Turn>
<Turn>
<Date>'2009-06-19 12:07:34'</Date>
<From>'Gavin Sharp'</From>
<Text>
<Sentence ID = "4.1"> (From update of attachment 383211 [details])</Sentence>
<Sentence ID = "4.2"> Perhaps we should rename one of them to _fhResult just to reduce confusion?</Sentence>
</Text>
</Turn>
<Turn>
<Date>'2009-06-19 13:17:56'</Date>
<From>'Justin Dolske'</From>
<Text>
<Sentence ID = "5.1"> (In reply to comment #3)</Sentence>
<Sentence ID = "5.2"> &gt; (From update of attachment 383211 [details] [details])</Sentence>
<Sentence ID = "5.3"> &gt; Perhaps we should rename one of them to _fhResult just to reduce confusion?</Sentence>
<Sentence ID = "5.4"> Good point.</Sentence>
<Sentence ID = "5.5"> I renamed the one in the wrapper to _formHistResult. </Sentence>
<Sentence ID = "5.6"> fhResult seemed maybe a bit too short.</Sentence>
</Text>
</Turn>
..... 等々
ヘルプは非常に高く評価されます...