Skip to main content
Solved

HTML to XML conversion


parashari
Forum|alt.badge.img+2

Hi,

 

I have a list of HTML files that contain tables and I want to convert those files to XML format.

I tried using a text file reader with HTMLToXHTMLConverter and XML writer. I also attempted HTMLToXHTMLConverter with creator and XML writer but didn't get the desired o/p. Is there some other way out for it? Or I am using different parameters?

Best answer by takashi

Hi @hellblazer, how about using the Text File writer?

View original
Did this help you find an answer to your question?

5 replies

takashi
Influencer
  • Best Answer
  • March 11, 2016

Hi @hellblazer, how about using the Text File writer?


parashari
Forum|alt.badge.img+2
  • Author
  • March 11, 2016
takashi wrote:

Hi @hellblazer, how about using the Text File writer?

Hi @takashi, the TextFile writer isn't accepting(red connectors) the o/p from the HTMLTo.. transformer.


takashi
Influencer
  • March 11, 2016
parashari wrote:

Hi @takashi, the TextFile writer isn't accepting(red connectors) the o/p from the HTMLTo.. transformer.

Just enter "text_line_data" to the "Output Attribute" parameter of the HTMLtoXHTMLConverter. Alternatively, you can write the resulting XHTML document directly into a file without using a writer, if you set "XHTML Output File" to the "XHTML Output" parameter and set a file path to the "XHTML Filename" parameter.


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • March 11, 2016
takashi wrote:

Hi @hellblazer, how about using the Text File writer?

Agree completely, the XML writer expects to assemble an XML output, but you already have fully formed XML. The TextLine writer is what you need. Or the techniques Takashi suggests.


parashari
Forum|alt.badge.img+2
  • Author
  • March 11, 2016
fmelizard wrote:

Agree completely, the XML writer expects to assemble an XML output, but you already have fully formed XML. The TextLine writer is what you need. Or the techniques Takashi suggests.

Absolutely!!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings