JDOM2 でサイトマップとそのインデックスを生成しています。
私が取得したいのはこれです:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>http://
そのため、「xmlns」というタイトルのルート要素に属性を追加しました。コードを実行すると、次のエラーが表示されます。
The name "xmlns" is not legal for JDOM/XML attributes: An Attribute name may not be "xmlns"; use the Namespace class to manage namespaces.
上記の構造を変更せずに必要なものを取得するにはどうすればよいですか? ありがとう!