http://qs321.pair.com?node_id=1065472


in reply to How can I add missing XML open tags

Note that those really aren't "missing" open tags. <tag/> is a valid XML shortcut for <tag></tag>

See http://www.w3.org/TR/REC-xml/#NT-content

  • Comment on Re: How can I add missing XML open tags

Replies are listed 'Best First'.
Re^2: How can I add missing XML open tags
by TheVend (Novice) on Dec 03, 2013 at 20:36 UTC

    You are so right. They are not technically “missing.” I use perl to parse my original XML and it needs open and closed tags (a design from years ago that needs some spit and polish). You have pointed me in the right direction. Now I can build a sub that will save me many hours of reengineering. Thank you so much!

      Let this be a warning to all those that "parse" XML by regexps and homebrewn "parsers". I wonder what's the next unexpected, but valid XML feature that'll force you to "fix" your source XMLs so that you can "parse" it.

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.