Hmmm, before going there let's be sure you're trying to do what you think you are.
Solr does _not_ index arbitrary XML. There is a very specific format of XML that describes solr documents that _can_ be indexed. But random XML is not supported. See the documents in example/exampledocs for the XML form of Solr docs. So if you have arbitrary XML, you need to parse it and then construct Solr documents. One way would be to use SolrJ, parse the docs using your favorite Java parser and construct SolrInputDocuments which you then use one of the SolrServer classes (e.g. CloudSolrServer) to add to the index. There really is no "Solr MXL Parser" that I know of, Solr just uses one of the standard XML parsers (e.g. sax)... Best, Erick On Wed, Feb 12, 2014 at 7:21 AM, Eric_Peng <sagittariuse...@gmail.com>wrote: > I was just trying to use SolrJ Client to import XML data to Solr server. > And > I read SolrJ wiki that says "SolrJ lets you upload content in XML and > Binary > format" > > I realized there is a XML parser in Solr (We can use a dataUpadateHandler > in > Solr default UI Solr Core "Dataimport") > > So I was wondering how to directly use solr xml parser to upload xml by > using SolrJ Java Code? I could use other open-source xml parser, But I > really want to know if there is a way to call Solr parser library. > > Would you mind send me a simple code if possible, really appreciated. > Thanks in advance. > > solr/4.6.1 > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Question-about-how-to-upload-XML-by-using-SolrJ-Client-Java-Code-tp4116901.html > Sent from the Solr - User mailing list archive at Nabble.com. >