Comments

The next line in the CarParts.xml file is

<!-- XML file that describes car parts -->

This is the XML comment line. The comment starts with the <!-- tag and ends with the --> tag. The XML processor ignores all text within the comment tag. However, it is important to remember that the comments' start and end tags for XML comments should be entered exactly as shown here. If there is a deviation, such as a space between < and !--, the XML parser might treat the comment as content markup, and you might have a rather unexpected outcome from the XML parsing. Another important point to remember is that you should not use the -- string in the comment. Other than these two limitations, you are pretty much free to use anything inside the comments. ...

Get Java™ APIs for XML Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.