[xml] simple XML parsing problem



Hello,

I am trying to parse an XML docbook file with libxml2 to produce some LaTeX output. I can explain the problem with the following XML example file:

...
<PARA>
 This is an <EMPHASIS>important</EMPHASIS> paragraph.
</PARA>
...

I would like to produce something like:

...
This is an \em{importtant} paragraph.\\
...

When I use xmlNodeListGetString() on PARA, I get "This is an paragraph.". When I parse the xmlChildrenNode of the node PARA I find the node EMPHASIS. However I have no way to find at which position, within PARA text, EMPHASIS is located and I cannot produce the desired output, but I can only produce:

...
This is an paragraph \em{important}\\
...

which is not good :(

Any help/hint on that question ?
Please CC: to Olivier Michel cyberotics com  Thanks

-Olivier




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