[xml] Getting Node content with markup



Hi,

I am implementing a python library to modify an XML-based documentation format which must be able to handle XML such as this:
    <Function name="foo">
<Description>The function <FuncName>foo</FuncName> modifies the variable <VarName>bar</VarName> etc.</Description>
    </Function>
Instead of creating classes for the <FuncName> and <VarName> elements I would like to pass the inner xml of the <Description> element directly to the user. I'm using the tree API and haven't found a suitable function. However, when I was looking at the XMLReader API I found the xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml functions but unfortunately they are unimplemented. If I have to I could write code to reconstruct the tags from the tree but I would much rather not have to undo the work of the parser. Does anyone know of a way to get the inner xml of an element with the tree api or know if and when this will be implemented. I might be able to donate an implementation if you are interested in it.

    Thanks,
- Ben Gamari



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