You are here: PSPad forum > English discussion forum > Remove quaotation remarks from begining and end of the line

Remove quaotation remarks from begining and end of the line

#1 Remove quaotation remarks from begining and end of the line

Posted by: sjturner1974 | Date: 2017-01-31 02:32 | IP: IP Logged

I regularly edit XML server post and server returns in a load testing tool called HPE load runner. I have found the Tidy XML feature in Pspad really useful to make these post and returns readable in the Script interface of load runner.

However when editing the text so I can make it readable I need to remove the quotation marks at the beginning and end of each line, then Concatenate each line of text into a single line of XML before I can use the tidy XML feature.

Is there a way to do this in a few clicks as at the moment I do this manually. Below is three lines of an example XML post that I need to edit. As you can see the line begins with quotation mark but the line of text also contains quotation marks.

"Body=tempXML=<Request><PaginateGroups><PaginateOptions id="Queue" SortNode="AppKey" SortOrder="ascending" CurrPage="1" Items="667"/><PaginateOptions id="Worklist" SortNode="AppKey" SortOrder="descending" CurrPage="1" Items="667"/></PaginateGroups><WebSessionXML><CSRFKey>{{CSRFKey}}</CSRFKey><Preferences><Page Id="DataEntry" Description="Data Entry Page"><Location>Top</Location><UseImages>0</UseImages><UseButtons>1</UseButtons><Items>666</Items><ViewPrevNextLinks>0</ViewPrevNextLinks></Page><Page Id="UserHome" Description="Home Page"><Location>Top</Location><UseImages>0</UseImages><UseButtons>1</UseButtons><Items>667</Items><HideUnassignedWL>0</HideUnassignedWL><Worklist><Fields/></Worklist></Page><Page Id="
""AppSearch" Description="Application Search"><ViewSetups>1</ViewSetups><SumByStatus>0</SumByStatus><Items>666</Items></Page><Page Id="QuickQuote" Description="Quick Quote Page"><Location>Top</Location><UseImages>0</UseImages><UseButtons>1</UseButtons><Items>666</Items></Page><Page Id="AppSummary" Description="Application Summary"><ViewApps>1</ViewApps><ViewSetups>0</ViewSetups><SumByStatus>1</SumByStatus><Items>666</Items><Worklist><Fields><Field Id="EQUIPMENT_COST" Description="Credit Amount" Type="MONEY" RapportOnly="0"/></Fields></Worklist></Page><Page Id="MsgSumm" Description="Message Summary Page"><Items>666</Items></Page><Page Id="ChangeHistory" Description="Change History Page"><Items>666"
"</Items></Page><Page Id="AssetSelection" Description="Asset Selection Page"><Items>10</Items></Page><Page Id="ReplicationPrompt" Description="Replication Prompt Page"><Items>666</Items></Page><Page Id="CustSummary" Description="Customer Summary Pages"><Location>Top</Location><UseImages>0</UseImages><UseButtons>1</UseButtons><Items>666</Items></Page><Page Id="UserMaint" Description="User Maintenance Page"><Items>666</Items></Page><Page Id="Attachments" Description="Attachments Page"><Items>666</Items></Page><Page Id="CustAttachments" Description="Customer Attachments Page"><Items>666</Items></Page><Page Id="AssetSearch" Description="Asset Search Page"><Items>666</Items></Page><DateFormat>dd"

Options: Reply | Quote | Up ^


#2 Re: Remove quaotation remarks from begining and end of the line

Posted by: sjturner1974 | Date: 2017-01-31 03:10 | IP: IP Logged

I think I have answered my own question

I am currently performing removing blank spaces at the beginning of the line to ensure all text lines begin with "

then perform a search and replace with regular expression twice
1st ^"
2nd $"
replace with blank text

then select all text and use Edit > Line manipulation > tidy

then select html tidy format

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR