LPS-33811 Re-sending the PR --> please read comments

Hey Brian,

As you asked in this PR (https://github.com/brianchandotcom/liferay-portal/pull/9995), I'm re-sending the changes without the XML modifications.

I think I understand your concern with that change, although I still think it would be beneficial to the coders and customers, so I'm going to re-think that solution. Until then here is the XML change free version.

The only thing I've changed is that I've stripped out the EmptyElement addition and the SAXReader modification, and I've merged Mike Han's source formatting.

Thanks,

Máté

cc: @KocsisDaniel