How can I index XML documents?
Otis Gospodnetic In order to index XML documents you need to first parse them to extract text that you want to index from them. Here are some XML parsers that can help you with that: See XML Demo. This contribution is some sample code that demonstrates adding simple XML documents into the index. It creates a new Document object for each file, and then populates the Document with a Field for each XML element, recursively. There are examples included for both SAX and DOM. See article Parsing, indexing, and searching XML with Digester and Lucene.