Well, I did not find the class that did this. Therefore, I myself implemented one of the subclasses of org.jdom.output.XMLOutputter
import java.io.IOException; import java.io.Writer; import java.util.*; import org.jdom.Attribute; import org.jdom.Element; import org.jdom.output.XMLOutputter; public class OneAttributePerLineOutputter extends XMLOutputter {
This serializer will follow the indentation policy for this format.
This allows you to apply attribute binding to only one namespace (I need this function), and you can specify the maximum number of built-in attributes that you allow before they are wrapped.
I hope this can be helpful to someone.
source share