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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:00:18+00:00 2026-05-18T10:00:18+00:00

Using Stax, I’m surprised to find that an XML block such as: <badger> <![CDATA[Text

  • 0

Using Stax, I’m surprised to find that an XML block such as:

<badger>
    <![CDATA[Text about a badger]]>
</badger>

is treated as if it were:

START_ELEMENT (badger)
CHARACTERS (        Text about a badger    )
END_ELEMENT (badger)

That is, the CDATA and the surrounding text are flattened into one text element. There is no CDATA element detected.

Is this correct behaviour? How can I separate the whitespace from the CDATA?

I am using the woodstox implementation.

  • 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-18T10:00:18+00:00Added an answer on May 18, 2026 at 10:00 am

    I don’t know about the woodstox implementation, but could this bug, resolved in 2006, still be a factor? Are you setting the optional report-cdata-event property?

    (See also this message about a similar problem.)

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

Sidebar

Related Questions

Is it possible using StAX (specifically woodstox) to format the output xml with newlines
I'm using the StAX event based API's to modify an XML stream. The stream
Using ASP.NET MVC there are situations (such as form submission) that may require a
this is my first time using StAX for parsing XML documents (still in the
I am trying to write XML data using Stax where the content itself is
I am using com.ctc.wstx.stax.WstxOutputFactory to generate XML. I am running wstx-asl-3.2.4 I need to
I am using stax for the first time to parse an XML String. I
I am using STAX parser to process every text node in a xhtml. The
I am using StAX to construct an XML document using an XMLStreamWriter . However,
We are using StAX parser to read the large XML files and strip off

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.