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

  • Home
  • SEARCH
  • 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 6208393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:48:03+00:00 2026-05-24T05:48:03+00:00

i am using org.w3c.dom in java to read an xml with the following function

  • 0

i am using org.w3c.dom in java to read an xml with the following function

try
        {
            cwNodes =  xmlDoc.getElementsByTagName("cw-page");
        }
        catch(Exception doe)
        {
            BusinessLogic.WriteLog("Exp msg: "+doe.getMessage());

        }

the xml is

<cw-page id='4545' num='1'>dlfdlkfsdf</cw-page>

it reads fine but when i pass the following xml

<cw-page id='4545' num='1'>dlfdlkfsdf&!@#%^*()</cw-page>

it doesnt read it, the exception essage is null as well, dont know what is wrong can anybody help, thanks

  • 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-05-24T05:48:04+00:00Added an answer on May 24, 2026 at 5:48 am

    & cannot occur by itself in a XML document as it is used to start a XML entity reference. Therefore, your XML document must contain &amp; and not & if a parser has to parse its contents correctly and return & in the text content. & is not the only character that XML parsers will fail to parse incorrectly if they are present on their own; there are other characters that must be present as the predefined XML entities for parsing to occur correctly.

    You should either correct the document, by using entity references or use CDATA sections to transport the special characters in the payload.

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

Sidebar

Related Questions

I am using rpxnow in Java, how do I use org.w3c.dom API to get
I am using org.w3c.dom.Element for adding elements to a xml file. Problem here is
I'm using Java 1.6. Given a org.w3c.dom.Node object, how do I get a String
I can copy a node from one XML file to another using org.w3c.dom.Document. importNode(Node
I'm using org.w3c XML API to open an existing XML file. I'm removing some
I am using the URLUTF8Encoder.java class from W3C ( www.w3.org/International/URLUTF8Encoder.java ). Currently, it will
Is it possible to convert nu.XOM.Element to org.w3c.dom.Element ? Am trying to construct XML
Using: javax.xml and org.w3c : public void removeNodeFromXML(File xmlfile_, String uuid) { DocumentBuilderFactory factory
I am validaing a xml using following code snippet. SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI); try
I'm using the following org.eclipse.jface.viewers.CheckboxCellEditor.CheckboxCellEditor(Composite parent) I'm creating a table viewer with cellEditors and

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.