C# Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



C# Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML to XML
HTTP
IMAP
Encryption
MHT / HTML Email
MIME
RSA Encryption
S/MIME
Socket
Spider
Tar Archive
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
String
Byte Array
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

Removing Text Formatting HTML Tags

By default, the Chilkat HTML to XML conversion component removes all text formatting tags. This includes tags for bold, italics, underline, etc. The DropTextFormattingTags method causes text formatting tags to be dropped. The UndropTextFormattingTags method causes them to be kept. This example shows the output XML when text formatting tags are dropped.

Chilkat.HtmlToXml h = new Chilkat.HtmlToXml();
h.UnlockComponent("Any string begins a 30-day trial");
h.DropTextFormattingTags();

h.Html = "<html><body><p>This is <b>simple</b> HTML.<br>This is on the 2nd line.</body></html>";
textBox1.Text = h.ToXml();

*****
The output for this program is shown below.  The br tag is considered a text formatting tag.

<?xml version="1.0" encoding="utf-8" ?>

<root>
<html>
<body>
<p>
<text>This is  simple HTML. This is on the 2nd line.</text>
</p>
</body>
</html>
</root>

Important: The download for this example does not contain the ChilkatDotNet.dll which
must be downloaded and installed separately at http://www.chilkatsoft.com/downloads.asp.
Once installed, add a reference to the DLL in the project by following the instructions at
http://www.example-code.com/vbdotnet/step2.asp

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2008 Chilkat Software, Inc. All Rights Reserved.

Email Component · XML Parser