Java Code Examples for org.apache.cxf.helpers.DOMUtils#getRawContent()

The following examples show how to use org.apache.cxf.helpers.DOMUtils#getRawContent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: W3CDOMStreamReader.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Override
public String getElementText() throws XMLStreamException {
    String result = DOMUtils.getRawContent(content);

    ElementFrame<Node, Node> frame = getCurrentFrame();
    frame.ended = true;
    currentEvent = END_ELEMENT;
    endElement();

    // we should not return null according to the StAx API javadoc
    return result != null ? result : "";
}
 
Example 2
Source File: W3CDOMStreamReader.java    From cxf with Apache License 2.0 5 votes vote down vote up
public String getText() {
    if (content instanceof Text) {
        return ((Text)content).getData();
    } else if (content instanceof Comment) {
        return ((Comment)content).getData();
    }
    return DOMUtils.getRawContent(getCurrentNode());
}
 
Example 3
Source File: WSDLServiceBuilder.java    From cxf with Apache License 2.0 4 votes vote down vote up
private void copyDocumentation(AbstractPropertiesHolder info, WSDLElement el) {
    if (el.getDocumentationElement() != null) {
        String doc = DOMUtils.getRawContent(el.getDocumentationElement());
        info.setDocumentation(doc);
    }
}