Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

XML DOM Parsing Issue with 


Thread view: 
clowtown - 08 Jun 2007 14:27 GMT
I have been having trouble parsing this string.

<UserValue value="John O&quot;Hare &#xA; 101 N. Main St"
title="ConsumedText"></UserValue>

The &quot; is being parsed correctly, but the &#xA is being converted
into a space instead of a linefeed/newline.  The newline is crutial to
formatting in the application.

I have been searching for a couple days now and tried many different
methods and have not been able to get the parser to stop converting
this character set into a single space.  I believe the issue is
occurring because it is an attribute value and not text in the node.

Please do not critique the format of the xml, as I know it is
undesireable.  I am just trying to implement a short term solution.

I should also mention that searching the xml file before parsing is
not feasible.

Tech being used: JRE 1.4.2.10, Xerces DOMParser

Thanks in advance for any advice.

--Clowtown
Pavel Lepin - 08 Jun 2007 14:45 GMT
clowtown <clowtown@gmail.com> wrote in
<1181309270.407258.274280@q69g2000hsb.googlegroups.com>:
> I have been having trouble parsing this string.
>
[quoted text clipped - 5 lines]
> into a space instead of a linefeed/newline.  The newline
> is crutial to formatting in the application.

You might want to read W3C's XML 1.0 4E, 3.3.3
(Attribute-Value Normalization).

Follow-ups set to comp.text.xml, this has very little to do
with Java, and everything to do with XML specs.

Signature

Pavel Lepin



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.