0

Let's say I have an Atom entry like this:

<entry xmlns:custom="http://custom.xsd">
   <title>test</title>
   <custom:solution>42</custom:solution>
</entry>

If I load the entry into Apache Abdera, I get a nice org.apache.abdera.model.Entry instance. And I can now conveniently access all standard Atom elements with getters.

But how would I read the value 42 from the custom:solution element?

rompetroll
  • 4,781
  • 2
  • 37
  • 50

1 Answers1

0

You can use something like:

for (Element element : (List<Element>)entry.getExtensions(" <UrI for custom namespace>")) {
    System.out.println(element.getText());// gives you 42
}
Mureinik
  • 297,002
  • 52
  • 306
  • 350