Я хочу проанализировать мой xml-файл (BPMN 2.0), чтобы прочитать содержимое тега <text>
по JDOM.Я имею в виду читать «Тест моей аннотации»
<textAnnotation id="myAnnotation_ID" signavio:alignment="left" textFormat="text/plain">
<text>Test of myAnnotation</text>
</textAnnotation>
Вот мой код:
Document doc = new SAXBuilder().build(myfile);
BPMN2NS = Namespace.getNamespace("http://www.omg.org/spec/BPMN/20100524/MODEL");
Element procElem = doc.getRootElement().getChild("process", BPMN2NS);
List<Element> textAnnotation = procElem.getChildren("textAnnotation", BPMN2NS);
Но то, что я уже могу прочитать, это [Element: <text [Namespace: http://www.omg.org/spec/BPMN/20100524/MODEL]/>],
как «содержание» textAnnotation"element.
Есть идеи, как мне прочитать" Test of myAnnotation "?