xml - Java DOM comments ordering -
i've made parser using java's dom parser loads xmls , correcting elements, attributes, etc.. problem output format doesnt keeps comments way i'd them be.
here's whats happening:
@@ -2107,7 +2121,8 @@ <set name="enchant_enabled" val="1" /> <set name="is_freightable" val="false" /> <skills> - <skill id="3599" level="1" /> <!-- polearm multi-attack --> + <skill id="3599" level="1" /> + <!-- polearm multi-attack --> </skills>
i couldn't find way keep comments on right side of element. wanted create new comments , put them either in before element or after not right next it.
is there way preserve such order?
thanks in advice!
no; semantically same xml file, , have no control on how elements going rendered. you'd have write own post-processor re-write xml file if wanted achieve effect.
Comments
Post a Comment