I think at least you need to review your import process. If nothing indexed, there's going to be nothing that matched. We need a little more information. Stuff like a short but concise test sample of what you're trying to index, how you're submitting the http request and the commit request (you did commit, right?), what messages you're getting when you do index and then commit.
I didn't look too closely at your last code example, but I would recommend using some XML libraries. If I remember it didn't. Most folks seem to process xml files for indexing by using the source xml files to create new files just for indexing. There's an identifier, which is usually used to link back to the source xml file in the application you design. Jon Gorman