Customer Portal

XML short form empty tag <tag/>

Comments 3

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi Parsa,

    currently there is no such setting. However I created improvement request - https://bug.javlin.eu/browse/CLO-312
  • Avatar
    julrych
    0
    Comment actions Permalink
    From the XML standpoint, there is no difference between <tag></tag> and <tag/>. The <tag/> is just a short version of the same; see http://www.w3.org/TR/2006/REC-xml11-20060816/#IDAHKIS for details.

    When parsing the <tag/> using parsers such as SAX, you should still receive both events "start element" and "end element". Similarly, there will not be any difference in the DOM tree built based on the two above representations of the tags.
  • Avatar
    hparsa
    0
    Comment actions Permalink
    Jaroslav,
    Thank you for considering this.

    Jan,
    Thank you for your reply. You are totally right but having the long form increases the file size significantly specially when there are considerable number of empty tags and the client would like to include the empty tags in the XML file.

Please sign in to leave a comment.