[
https://issues.apache.org/jira/browse/SOLR-3604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408959#comment-13408959
]
Uwe Schindler commented on SOLR-3604:
-------------------------------------
bq. I work on a product that has a class that edits solrconfig.xml and
schema.xml. We keep the DOM tree around and edit it directly for modifications
- later we serialize it out with changes, preserving comments. It seems to work
out just fine - at the least it turns out a lot better than just stripping the
comments.
That's what I proposed 2 comments ago. It needs a major rewrite of the whole
solr.xml parsing. I would *not* directly edit the DOM tree (this is crazy),
instead create a XSD schema and create Java classes out of it (that wrap the
DOM tree).
I just wanted to mention, that a XML parser is *not* required to preserve
comments on de/serialization, because the file semantically identical. So if
you drop in a custom, high-speed XML parser into your classpath, the comments
may get lost. :-)
bq. I'm not sure why we do any XML writing manually - I have no problem
replacing that.
Just crazy unneeded code, but as no XML-like syntax structure is available, the
writer of that code wrote it by hand, instead of, e.g., sending SAX events to
TransformerHandler for serialization.
> The wiki claims all comments are wiped from solr.xml on save - we should fix
> this.
> ----------------------------------------------------------------------------------
>
> Key: SOLR-3604
> URL: https://issues.apache.org/jira/browse/SOLR-3604
> Project: Solr
> Issue Type: Bug
> Reporter: Mark Miller
> Assignee: Mark Miller
> Priority: Minor
> Fix For: 4.0, 5.0
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]