Questions tagged [xml-comments]

Can refer to 1) comments in XML documents or 2) XML markup used for documentation in programming language comments.

A comment in an XML document looks like this:

<!-- comment text -->

See https://www.w3.org/TR/xml/#sec-comments.


For information on the second meaning of this tag, see https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/.

See also https://blog.submain.com/using-xml-comments/.

315 questions
3
votes
3 answers

Is this a valid XML comment?

Is the code below valid XML? attribute3="value3">
aioobe
  • 413,195
  • 112
  • 811
  • 826
3
votes
0 answers

Are xml comments in VB still customizable?

Since Visual Studio 2005 we could copy a file named VBXMLDoc.xml into the path: C:\Users\*user*\AppData\Roaming\Microsoft\VisualStudio\*version*\ to define the XML tags available for documentation, and which tags were inserted by default. However, I…
Wilhelm
  • 1,868
  • 14
  • 21
3
votes
2 answers

Using XPath to access comments a flat hierachy

I have a given XML document (structure can not be changed) and want to get the comments that are written above the nodes. The document looks like this: Book A
Sebastian
  • 33
  • 2
3
votes
0 answers

JavaScript Intellisense - Field of the same type as surrounding object

In an MVC 4 ASP.Net project I have the following JavaScript file: Foo = function () { /// this.bar = null; } Foo.prototype.test = function () { this. } When I type the period in…
3
votes
1 answer

How to make Xml comments in VS 2008 work with Intellisense for enumerations?

It appears that not all Xml-Commenting shows up in Intellisense, but perhaps I am not doing it correctly? Anyway, I am trying to make it so that individual enumeration members in an enumeration list show up in intellisense with descriptive text. …
Starwatcher
  • 832
  • 1
  • 6
  • 8
3
votes
1 answer

Why does XMLStreamReader/StAXSource strip comments from XML?

The code below (based on sample code from http://jax-ws.java.net/nonav/jax-ws-20-fcs/arch/com/sun/xml/ws/util/xml/StAXSource.html) String xml = "a text"; StringReader sr = new StringReader(xml); XMLStreamReader…
3
votes
3 answers

Java - Reading Comment from XML-File

I have to extract comments from a XML-File. I couldn't find a way to get them using JDOM or something else. At the moment I use Regex and FileReader but I don't feel like this is the way to go. Can you use something like JDOM to get comments from a…
Frank Wittich
  • 139
  • 3
  • 11
3
votes
3 answers

What is the convention C# developers use to indicate their authorship of a class?

I read from a few places and learnt that there is no author tag in C# XML comments. But I'm sure it is common to come across situations where we have to use some ways to tell people that a particular class is written by who and who. For myself, I…
Carven
  • 14,988
  • 29
  • 118
  • 161
3
votes
1 answer

How can I automatically export XML source comments to a text document?

I have been using XML comments to document my source code in VB.Net (and C# when I get to). I seem to remember someone telling me a long time ago that there was a way to automatically export the XML comments into a text document or other format for…
RiddlerDev
  • 7,370
  • 5
  • 46
  • 62
3
votes
0 answers

How can I make GDataXML ignore comments?

When GDataXML parses this line It gives me the comment for now, the first answer is the right one as a child element. Is this expected behavior for an XMLParser? How can I…
Ziggy
  • 21,845
  • 28
  • 75
  • 104
2
votes
1 answer

VS: Attribute for ignoring missing XML comments when building

I have a VS2008 solution using xml documentation, and we have warnings as errors turned on for release mode (a nice feature IMHO); this results, however, in long lists of 'missing xml comment' errors for such things as every element of a (self…
Joel in Gö
  • 7,460
  • 9
  • 47
  • 77
2
votes
1 answer

How to convert metadata comments into summary comments

I want to write a wrapper class for the set of existing classes. When I go to the definition of existing class it shows meta-data file with comments like // Summary: // This is Test comments As I am writing the wrapper class it has…
Atul Sureka
  • 3,085
  • 7
  • 39
  • 64
2
votes
1 answer

Reference Prefixes in .NET XML Documentation

I've been attempting to fully document all types, methods, properties, etc. of a class library using XML comments but have run into a curious effect involving the cref attribute (used by see tags for example). Going by the advice of this MSDN page…
Noldorin
  • 144,213
  • 56
  • 264
  • 302
2
votes
2 answers

Comment template in VS2010

I have inherited an API which doesn't have proper comments, and I am working on changing that. Anyone know if there is some sort of mechanism to add a default XML comments to all the members of a class or an assembly? (I remember seeing something…
VoodooChild
  • 9,776
  • 8
  • 66
  • 99
2
votes
0 answers

Xml comment reference generic

I'm trying to make some examples for a method but I just can't make it work. The generic parameters are never highlighted. What's the correct syntax? /// /// /// Example: /// /// map =…