Never mind - I discovered UtilXml.childElementValue(...)

Problem solved.

Adrian Crum wrote:

I'm working on the entity engine model classes to include support for accessing the description elements during run time. I've run into a problem I can't figure out.

Using the following entity definition:

<entity entity-name="Content" package-name="org.ofbiz.content.content" title="Content Entity"> <field name="ownerContentId" type="id"><description>Used for permissions checking</description></field>
  ...
</entity>

I have the description Element in code, but I can't seem to get the text of the description:

NodeList descriptionList = fieldElement.getElementsByTagName("description");
for (int i = 0; i < descriptionList.getLength(); i++) {
    Element element = (Element) descriptionList.item(i);
    if (element.getNodeValue() != null) {
        this.description = element.getNodeValue();
    }
}

I've tried getNodeValue() and getTextContent(), but both return null.

Any ideas?

-Adrian




Reply via email to