login about faq

Hi, I want a sampple code to convert my html file to XML using chilkat. The links provided in the documentation for Example#1, 2 & 3 are broken. I am trying the following code but its not giving me the results:

import com.chilkatsoft.CkHtmlToXml;
import com.chilkatsoft.CkByteData;
import com.chilkatsoft.CkString;

public class TestingCodes {
    static {
        try {
            System.loadLibrary("chilkat");
         } catch (UnsatisfiedLinkError e) {
             System.err.println("Native code library failed to load.\n" + e);
             System.exit(1);
         }
    }
    public static void main(String[] args) {
        System.out.println("Starting conversion");
        CkHtmlToXml obj = new CkHtmlToXml();
        obj.UnlockComponent("anything for 30-day trial");

        try{
        boolean b = obj.ConvertFile("C:\\Users\\user\\Desktop\\index.html", "C:\\Users\\user\\Desktop\text_op.xml");
        if(b)
            System.out.println("Converted successfully!");
        else
            System.out.println("Error in converting");
        }
        catch(Exception e){
            e.printStackTrace();
        }
    }

}

The output is: " error in converting" I am working with jdk 7 and I've installed the JDK 7 version for chilkat 64 bit, ran the runTest.bat, which in turn logged the version as 9.5.0.45 on cmd. Is there anything I am missing in the procedure to make it working?

asked Nov 13 '14 at 01:27

AakashJ's gravatar image

AakashJ
11


The examples have been restored on the website.

To get information about the problem, examine the contents of the obj.LastErrorText after calling obj.ConvertFile.

link

answered Nov 14 '14 at 11:49

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×98
×59
×21
×20

Asked: Nov 13 '14 at 01:27

Seen: 1,872 times

Last updated: Nov 14 '14 at 11:49

powered by OSQA