For HTML, many folks do use that monicker for markup of the form </name>. In the HTML DOM (and the XML DOM for that matter) no construct maps to that markup, it's merely an artifact of DOM serialisation; an equivalent serialisation might employ whitespace (such as indentation) to demarkation of nested nodes. There is no way to "search" for such an entity in the DOM.

I personally don't mind it when people call markup of that form an 'end tag' in HTML because it's possible to construct invalid documents that will usually render correctly in most HTML browsers.

It makes no sense to refer to "tags" for XML as it's not possible to make use of an invalid XML document. The DOM is constructed from (possibly) nested Nodes (of various types) and string-like values attached to those Nodes.

And finally, the OP was refering to the XML nodes of the form <name />, which is not at all the same as HTML of the form </name>  . The former represents a Node in the DOM without child-nodes, nor attributes, nor value; the later does not represent any node, attribute or value in the DOM.

-David [erroneousBollock isn't logged in]


In reply to Re^3: Parse XML file by Anonymous Monk
in thread Parse XML file by blackdragoen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.