Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How can I add missing XML open tags

by Crackers2 (Parson)
on Dec 03, 2013 at 18:41 UTC ( #1065472=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1065472]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2020-10-20 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (208 votes). Check out past polls.

    Notices?