[jdom-interest] XERCES 1.3 and JDOM

Gordon Augat gordon_augat at crosscommerce.com
Tue Mar 6 17:23:02 PST 2001


Give the following document

<!DOCTYPE html >
<html>
  <head>
    <title>Augat Admin</title>
	<script language="JavaScript1.2">
	<!--
	comment
	-->
	</script>
  </head>
  <body>
  </body>
</html>

The following code snippet

// element represents the <script> element
List list = element.getMixedContent();
for (int i = 0; i < list.size(); i++) {
	System.out.println(i + ": " + list.get(i).toString());
}

produces the following output:

0:

if I remove <!DOCTYPE html > from the document, I get the following result:

0:
1: [Comment: <!--
	comment
	-->]
2:

With a version of Xerces prior to 1.3, I get the second output whether I
have <!DOCTYPE html > in the document or not.

Any ideas?

Gordon




More information about the jdom-interest mailing list