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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:40:11+00:00 2026-05-26T11:40:11+00:00

Trying to read a generated XML from a MS Webservice URL page = new

  • 0

Trying to read a generated XML from a MS Webservice

URL page = new URL(address);
StringBuffer text = new StringBuffer();
HttpURLConnection conn = (HttpURLConnection) page.openConnection();
conn.connect();
InputStreamReader in = new InputStreamReader((InputStream) conn.getContent());
BufferedReader buff = new BufferedReader(in);
box.setText("Getting data ...");
String line;
do {
  line = buff.readLine();
  text.append(line + "\n");
} while (line != null);
box.setText(text.toString());

or

URL u = new URL(address);
URLConnection uc = u.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {

    inputLine = java.net.URLDecoder.decode(inputLine, "UTF-8");
  System.out.println(inputLine);
}
in.close();

Any page reads fine except the web service output
it reads the greater and less than signs strangely

it read < to “& lt;” and > to “& gt;” without spaces, but if i type them here without spaces stackoverflow makes them < and >

Please help
thanks

  • 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-26T11:40:12+00:00Added an answer on May 26, 2026 at 11:40 am

    Mark Rotteveel is correct, the webservice is the culprit here it’s for some reason sending the greater than and less than sign with the & lt and & gt format

    Thanks Martin Algesten but i have already stated i worked around it i was just looking for why it was this way.

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

Sidebar

Related Questions

I've been trying to read a node in an xml file generated from DSLR
I'm trying to generate POJO's from mapping xml files. I read something about adding
I am trying to read ASCII text response from a tcp open streaming socket
I am trying to read tags from XML using LibXML. I can print all
I am trying to read data from an MS Project XML file. I have
I am trying to read from an ncx file (i.e. xml file) using XElement:
I`m trying to read my build version number from a text file, and then
I'm trying to read a RSS generated by wordpress with full text activated. On
I'm currently trying to read in an XML file, make some minor changes (alter
I'm trying to read through the documentation on Berkeley DB XML , and I

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.