Re: [xml] Bug or expected behaviour with xmlNewChild

On Mon, Aug 05, 2013 at 09:08:39PM +0100, Neil Barnes wrote:
On 05/08/13 04:26, Daniel Veillard wrote:
On Wed, Jul 31, 2013 at 08:32:01PM +0100, Neil Barnes wrote:
This one is really confusing me... I'm the first to admit I'm not at
all sure what I'm doing, but:

I'm trying to create an xhtml file as part of an epub. (I've already
successfully exported an html and imported an xml file into the
program, and I'm getting no error messages.)

My google-fu is weak on this one; I can find nothing relevant in
either the archive or generally on the net.

What I want:



<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />

<link href="../Styles/page_styles.css" rel="stylesheet" type="text/css" />


  ouch ...

and I cannot find a way to make the link elements terminate.

doc = htmlNewDoc (NULL, NULL);

First XHTML is *XML* , so xmlNewDoc() must be called.

Thank you, Daniel.

I found your example - (a) I failed to use xmlNewDoc() and (b) I
used htmlSaveFile() instead of xmlSaveFormatFileEnc() - as well as
the other errors you point out!

Sorted now.

Thanks again.

[re-adding the mailing-list]

  okay :-)
Actually if you want to help, could you turn your final test program
generating xhtml into something running standalone, then we could add
it to
to help future people looking at doing the same kind of code.

There are many parts of the library where we don't have examples,
if we were to extend the set of examples, that would be a great,


Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit | virtualization library

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]