XML example file in a comment
Hi,
i need to know how to put a little XML example file in a comment. This is what i have :
* to be consulted. Next you can see an example of a configuration file :
/**
*<P>
* blablablablalbablablabla
*
*
*
*
* <?xml version="1.0" encoding="utf-8" ?>
* <!-- Comments -->
* <CONF>
*<FONT>
* <FONT_SIZE>11</FONT_SIZE>
* <FONT_TYPE>SansSerif</FONT_TYPE>
*</FONT>
*<THREADPOOL>
* <MAX_POOL_SIZE>30</MAX_POOL_SIZE>
*</THREADPOOL>
*<FIELDS>
*<FIELD_NAME>to</FIELD_NAME>
*<FIELD_NAME>subject</FIELD_NAME>
*</FIELDS>
*<WAIT_TIME>0.1</WAIT_TIME>
* </CONF>
*
*
*/
I tried using the <code> tag but it does not work. anyone?
thanks in advance
[994 byte] By [
Zede77a] at [2007-9-28 18:32:19]

Do you want the XML to appear with angle bracket, like <CONF> in the
resulting HTML page? If so, simply use the entities < and >
as follows, and you can either enclose the whole thing in <code>
with
at the end of each line, or just enclose the whole thing
in <pre>. It's ugly, but it should work.
/**
*<P>
* blablablablalbablablabla
*
*
*
* <pre>
* <?xml version="1.0" encoding="utf-8" ?>
* <!-- Comments -->
* <CONF>
* <FONT>
* ...
* </pre>
*/
etc.
-Doug Kramer
javadoc team
I have a similar problem, with a larger XML structure. However, I want the developers to maintain the XML within the comments and, as you may expect, by encoding the characters it looks ugly and they are less likely to update it. Is there a way to just include a block of XML as text within the JavaDoc (similar to using the CDATA tag in XML?)