Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: DocumentBuilder.parse raises the error "The prefix "c" for element "c:de" is not bound."

  1. #1
    Member
    Join Date
    Apr 2014
    Posts
    31
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default DocumentBuilder.parse raises the error "The prefix "c" for element "c:de" is not bound."

    I am getting the error "The prefix "c" for element "c:de" is not bound." Any clue will be very appreciated.

    javax.xml.parsers.DocumentBuilderFactory fac = new org.apache.xerces.jaxp.DocumentBuilderFactoryImpl( );
    fac.setNamespaceAware(true);
    org.w3c.dom.Document d = null;
    javax.xml.parsers.DocumentBuilder builder = fac.newDocumentBuilder();
    d = builder.parse("C:/my_folder/my_file.xml"); //the error rises in this line

    my_file.xml is exactly and complete pasted here.
    <?xml version="1.0" encoding="UTF-8"?>
    <c:de format="N" lengthField="0" maxLength="012" minLength="012" name="AMOUNT, TRANSACTION" number="004" subFields="00"/>


  2. #2
    Member
    Join Date
    Feb 2014
    Posts
    180
    Thanks
    0
    Thanked 48 Times in 45 Posts

    Default Re: DocumentBuilder.parse raises the error "The prefix "c" for element "c:de" is not bound."

    Cross-posted and answered at java - DocumentBuilder.parse raises the error "The prefix "c" for element "c:de" is not bound." - Stack Overflow.

    In the future please include the URL of any other forums where this is cross-posted. This is so that others can quickly check if it has already been answered, and so not waste time replying.

  3. #3
    Member
    Join Date
    Apr 2014
    Posts
    31
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Re: DocumentBuilder.parse raises the error "The prefix "c" for element "c:de" is not bound."

    Thank you. I will.

Similar Threads

  1. Understanding layers of system logic. Clarity for what "SDK" & "JDK" mean
    By MilkWetGhost in forum Java Theory & Questions
    Replies: 1
    Last Post: October 3rd, 2013, 12:25 PM
  2. "Error cannot find symbol" "throws BadLocationException"
    By coltson in forum AWT / Java Swing
    Replies: 1
    Last Post: June 30th, 2013, 10:33 PM
  3. Replies: 2
    Last Post: June 22nd, 2013, 10:30 AM
  4. Replies: 3
    Last Post: December 7th, 2011, 02:03 AM
  5. Replies: 7
    Last Post: August 13th, 2011, 01:22 AM

Tags for this Thread