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 1106059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:43:58+00:00 2026-05-17T01:43:58+00:00

I have an XML document with some sample content like this: <someTag> <![CDATA[Hello World]]>

  • 0

I have an XML document with some sample content like this:

<someTag>
 <![CDATA[Hello World]]>
</someTag>

I’m parsing the above XML in JavaScript. When I try access and render the Hello World text using xmldoc.getElementsByTagName("someTag")[0].childNodes[0].textContent all I get was a blank text on screen.

The code is not returning undefined or any error messages. So I guess the code is properly accessing the message. But due to CDATA, it is not rendering properly on screen.

Anyway to fix the issue and get the Hello World out of this xml file?

  • 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-17T01:43:58+00:00Added an answer on May 17, 2026 at 1:43 am

    If you’re running Firefox, maybe this is the issue you’re having. The behavior looks very similair… The following might do the trick:

    xmldoc.getElementsByTagName("someTag")[0].childNodes[1].textContent;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML document containing contact information as seen below: <contact type=individual> <firstname>Some</firstname>
I have written some code that loads an XML document using an XmlDocument object
I have an xml document that contains some html. <begin-line> <verse-num>6</verse-num>a mixed people<footnote id=f2>
I have some sort of ... xml document as below : <file src=136090000-136100000> <member
I have some kind xml content I need to extract the information and store
I've got a 2-part question... I have some XML that looks like: <trans-unit id=70
Here is my requirement. My sample input document is like below. (I have added
I have a simple xml document that looks like the following snippet. I need
I have some xml documents I need to run queries on. I've created some
So, i have some question about xml Documents in Java. Can i get all

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.