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

  • Home
  • SEARCH
  • 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 78819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:02:49+00:00 2026-05-10T21:02:49+00:00

I have an incoming soap message wich form is TStream (Delphi7), server that send

  • 0

I have an incoming soap message wich form is TStream (Delphi7), server that send this soap is in development mode and adds a html header to the message for debugging purposes. Now i need to cut out the html header part from it before i can pass it to soap converter. It starts from the beginning with ‘pre’ tag and ends with ‘/pre’ tag. Im thinking it should be fairly easy to but i havent done it before in Delphi7, so can someone help me?

  • 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. 2026-05-10T21:02:50+00:00Added an answer on May 10, 2026 at 9:02 pm

    I think the following code would do what you want, assuming you only have one <pre> block in your document.

    function DepreStream(Stm : tStream):tStream; var   sTemp : String;   oStrStm : tStringStream;   i : integer; begin   oStrStm := tStringStream.create('');   try     Stm.Seek(0,soFromBeginning);     oStrStm.copyfrom(Stm,Stm.Size);     sTemp := oStrStm.DataString;     if (Pos('<pre>',sTemp) > 0) and (Pos('</pre>',sTemp) > 0) then       begin         delete(sTemp,Pos('<pre>',sTemp),(Pos('</pre>',sTemp)-Pos('<pre>',sTemp))+6);         oStrStm.free;         oStrStm := tStringStream.Create(sTemp);       end;     Result := tMemoryStream.create;     oStrStm.Seek(0,soFromBeginning);     Result.CopyFrom(oStrStm,oStrStm.Size);     Result.Seek(0,soFromBeginning);   finally     oStrStm.free;   end; end; 

    Another option I believe would be to use an xml transform to remove the unwanted tags, but I don’t do much in the way of transforms so if anyone else wants that torch…

    EDIT: Corrected code so that it works. Teaches me for coding directly into SO rather than into the IDE first.

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

Sidebar

Related Questions

I have 1 process that receives incoming connection from port 1000 in 1 linux
I have a Java application that monitors a folder for incoming XML files. When
I have a legacy C++-based application that timestamps incoming network traffic using the CRT
I have a worker thread that is listening to a TCP socket for incoming
I have a incoming stream of bytes (unsigned char) from either a file or
Have you ever seen any of there error messages? -- SQL Server 2000 Could
I have a single URL accessible through a servlet that I have locked down
I have 2 links that hide present different information to the users on the
We currently have an application that sends out SMS to users, it acts like
Have just started using Google Chrome , and noticed in parts of our site,

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.