Generally, it is required for a developer to convert a long query/xml/content to string and assign to a variable in the code. There is online utility to do this. Suppose you have to convert following to string and assign to a variable str in c#.
<book id=”bk101″>
<author>Gambardella, Matthew</author>
<title>XML Developer’s Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
Then you need to select Split criteria, Method type, quote type and click on Convert button.
Split Criteria:
1. Use existing line breaks: It will perform operation on existing line.
2. Merge all lines and split fixed length: It will merge all lines and split with user given fixed length and performed operation on this.
Join Method:
1. Append Method: It will use append method to join lines.
2. += Method : It will join lines in += format.
3. Use + at End of line
Quote Type:
Single Quote String and Double Quote String
You need to select proper options and click on convert button to get output. The main thing, I like the most is If I select Single Quote then it will replace all existing single quote with escaped quote(\’) and same for double quote.
Update: Visit New Tool: BrijPad. It has many advanced features.
Hope, It helps.
That was a good tool, but no link to reach that tool now.
It’s added in BrijPad(http://techbrij.com/brijpad)
you can find a similer free tool at http://www.sql2string.com