Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8656801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:22:08+00:00 2026-06-12T15:22:08+00:00

I am currently working on the development of an Apache CXF Web Service with

  • 0

I am currently working on the development of an Apache CXF Web Service with XMLBeans binding instead of the default JAXB binding. I am compiling and running the code with Java 1.6.
I get a “DOM Level 3 Not implemented” error at runtime for the following code snippet :

ExtType[] extTypeList = p.getExtArray();
        for (ExtType extType : extTypeList) {               
            Node node = extType.getDomNode();
            NodeList objList = node.getChildNodes();
            for (int i = 0; i < objList.getLength(); ++i) {
                Node text = (Node) objList.item(i);                 
                if (text.getNodeName() != null
                        && text.getNodeName() == XmlConstant.NODE_NAME) {

                    info.setDuration(text
                            .getTextContent());
                }
            }
        }

The exact error displayed in JBoss is as follows :

java.lang.RuntimeException: DOM Level 3 Not implemented
        at org.apache.xmlbeans.impl.store.DomImpl._node_getTextContent(DomImpl.java:2516)
        at org.apache.xmlbeans.impl.store.Xobj$NodeXobj.getTextContent(Xobj.java:2607)

From the above error message, it is clear that the getTextContent method is causing the exexception because the DOM level 3 API’s are not found at run-time. How do I eliminate this error? I am guessing I’ll have to figure out which jar contains the DOM API’s and delete all dom related classes from that jar so that the default DOM API’s that come along with jdk are used instead. Alternately, is there a way to get the text contents of an xml tag using DOM without relying on the getTextContent method?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:22:09+00:00Added an answer on June 12, 2026 at 3:22 pm

    It appears as though XMLBeans provides a DOM implementation that is not DOM 3 compliant based on the exception:

    java.lang.RuntimeException: DOM Level 3 Not implemented
            at org.apache.xmlbeans.impl.store.DomImpl._node_getTextContent(DomImpl.java:2516)
            at org.a
    
    pache.xmlbeans.impl.store.Xobj$NodeXobj.getTextContent(Xobj.java:2607)
    

    Instead of getTextContent you could iterate over all the child nodes and append the value from all nodes of type text.

    package forum12746038;
    
    import java.io.StringReader;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.InputSource;
    
    public class Demo {
    
        public static void main(String[] args) throws Exception {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            String xml = "<root>Hello <!-- comment -->World</root>";
            Document doc = db.parse(new InputSource(new StringReader(xml)));
    
            Element element = doc.getDocumentElement();
            NodeList childNodes = element.getChildNodes();
            StringBuilder strBldr = new StringBuilder();
            for(int x=0; x<childNodes.getLength(); x++) {
                Node childNode = childNodes.item(x);
                if(childNode.getNodeType() == Node.TEXT_NODE) {
                    strBldr.append(childNode.getNodeValue());
                }
            }
            System.out.println(strBldr.toString());
        }
    
    }
    

    I am guessing I’ll have to figure out which jar contains the DOM API’s
    and delete all dom related classes from that jar so that the default
    DOM API’s that come along with jdk are used instead.

    This probably won’t work as I imagine XMLBeans returns a specialized DOM implementation that wraps there own objects to expose them through DOM APIs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working in web development and my default desktop is Ubuntu and I'm
I'm currently working on a web application development. Our company methodology is to work
Well,I am learning the web development and currently working on PHP and mySQL ,I
I'm currently working at a small web development company, we mostly do campaign sites
I am currently working on a web development where I am now doing my
hi im new in ruby on rails development and currently im working in a
I'm currently trying to get a grip on Android development and working my way
Currently my project is working perfectly on IOS development target 3.2 But as soon
I am new to database development and am currently working in MySQL. I have
I am new to iPhone development and I am currently working on a simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.