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 / First Aid / March 2004

Tip: Looking for answers? Try searching our database.

create new String without newlines and "

Thread view: 
Petterson Mikael - 10 Mar 2004 15:30 GMT
Hi,

I am parsing a file to retrieve some data , between the tags:

<Foundation.Extension_Mechanisms.TaggedValue.value>int:adminis
trativeState=1;
int:alarmStatus=0;
int:auType=2;
int:piuType=;
String;userLabel=&quot;&quot;;</Foundation.Extension_Mechanisms.TaggedValue.value>

When I create a String containing this it seems like there is "newlines"
included.
Also for the "" marks there is &quot;&quot. How can I create a String
with the following:

int:administrativeState=1;int:alarmStatus=0;int:auType=2;int:piuType=;String;userLabel=&quot;&quot;;

All hints are welcome!

BR

//Mikael
Steve W. Jackson - 10 Mar 2004 17:46 GMT
>:Hi,
>:
[quoted text clipped - 21 lines]
>:
>://Mikael

Why not treat the "file" as what it appears to be -- XML?  When you call
on an XML parser, it will remove those extra newline characters as
unnecessary white space (unless told not to do so, as some allow).  
Typically, that would change the &quot; to an actual " character, so you
might need to handle that.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama



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.