Hi,
I'm using a DOMParser in a custom RSS-reading application. I'm having
a problem with this snippet of XML (extraneous info removed):
<title>...</title>
<guid isPermaLink="true">...</guid>
<link>...</link>
<comments>...</comments>
<description>
...
</description>
<report:id>...</report:id>
<report:category>...</report:category>
<report:attributes>
<report:attribute type="Source">TV
Cap</report:attribute>
<report:attribute
type="Source">HDTV</report:attribute>
<report:attribute type="Video
Fmt">x264</report:attribute>
<report:attribute type="Video
Fmt">720p</report:attribute>
<report:attribute type="Video
Genre">Action/Adv</report:attribute>
<report:attribute type="Video
Genre">Drama</report:attribute>
<report:attribute
type="Language">English</report:attribute>
</report:attributes>
<report:groups>
<report:group>...</report:group>
</report:groups>
<report:progress value="1">...</report:progress>
<report:moreinfo>...</report:moreinfo>
The "report:attributes" node is returning as having 0 children, as
this debug output shows:
Element: title
Character data: ...
Element: guid
Attribute: isPermaLink = true
Character data: ...
Element: link
Character data: ...
Element: comments
Character data: ...
Element: description
Element: report:id
Character data: ...
Element: report:category
Character data: ...
Element: report:attributes
Element: report:groups
Element: report:group
Character data: ...
I'm getting the Document through the following code:
DOMParser parser = new DOMParser();
InputStream in;
try {
in = url.openStream();
InputSource source = new InputSource(in);
parser.parse(source);
in.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Document doc = parser.getDocument();
Is this a bug, or is there something I need to do to get it to work?
I'm on XercesJ 2.9.0 (standard plugin that distributes with eclipse,
I'm using RCP.)
Many thanks in advance for any ideas,
Mike
--
----------------------------------------------
Mike Hepple
[email protected]
----------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]