Ruby Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Ruby
Examples

Quick Start
Ruby Unicode
Ruby Byte Array
Ruby Certs
Ruby Email
Ruby Encryption
Ruby FTP
HTML-to-XML
Ruby HTTP
Ruby IMAP
Ruby MHT
Ruby MIME
Ruby S/MIME
Ruby Signatures
Ruby RSA
Ruby Socket
Ruby Spider
Ruby Tar
Ruby Upload
Ruby XML
Ruby XMP
Ruby Zip

More Examples...
String
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
DH Key Exchange
DSA

Unreleased...
LZW
Bz2
Icon

 

 

 

 

 

 

 

Convert HTML files into well-formed XML

The Chilkat Ruby HTML-to-XML conversion component will convert any HTML to well-formed XML. After converting, existing XML parsers, tools, and libraries can be leveraged to extract (scrape) information.

The input/output files used in this example are provided here, along details explaining rules for conversion.

Download Ruby Programming Example Scripts

# file: htmlToXml.rb

require 'chilkat'

# Ruby script to convert HTML files to well-formed XML

htmlConv = Chilkat::CkHtmlToXml.new()
success = htmlConv.UnlockComponent("anything for 30-day trial")
if not success
	print "component is locked!"
	exit
end

htmlConv.ConvertFile("exampleData/test1.html","output/test1.xml")
htmlConv.ConvertFile("exampleData/test2.html","output/test2.xml")
htmlConv.ConvertFile("exampleData/test3.html","output/test3.xml")





 

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

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