This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes [#text: String] being displayed in output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply locked New topic

[#text: String] being displayed in output

Gaurav Pawar
Ranch Hand

Joined: Sep 12, 2006
Posts: 37
My Bean parses the data in an XML file, prepares a string and passes it to a JSP Page. When i am to display this string in the browser it shows me
[#text: abcd][#text: efghi]. Please can anyone suggest how do i rectify this?

When i run the bean alone i see the output as "abcd" and "efghi".

Paul Clapham

Joined: Oct 14, 2005
Posts: 19725

"gkpawar Pawar", welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.

In answer to your question, probably your bean is using the toString() method of a node to produce the node's text value. This is implemented differently in different DOM implementations and should not be relied upon.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19725

Closing this topic.
I agree. Here's the link:
subject: [#text: String] being displayed in output
It's not a secret anymore!