On Tue, 30 Aug 2005 12:05:38 +0100, "Richard Lewis"
<[EMAIL PROTECTED]> said:
>
> On Tue, 30 Aug 2005 11:17:25 +0100, "Richard Lewis"
> <[EMAIL PROTECTED]> said:
> >
> > Here is the *complete* code for my SectionCursor class:
>
> In case anyone's interested, I've just noticed a logical error in
On Tue, 30 Aug 2005 11:17:25 +0100, "Richard Lewis"
<[EMAIL PROTECTED]> said:
>
> Here is the *complete* code for my SectionCursor class:
In case anyone's interested, I've just noticed a logical error in the
next_node() method:
=
def next_node(self):
if self.cur
On Fri, 26 Aug 2005 11:43:18 +0100, "Richard Lewis"
<[EMAIL PROTECTED]> said:
>
> I'm implementing a Cursor class now which keeps track of the current
> parent Element, text node and character position so that I can easily (I
> hope ;-) work out where the splitting and inserting needs to occur. W
On Fri, 26 Aug 2005 13:59:09 +0200, "Fredrik Lundh"
<[EMAIL PROTECTED]> said:
> Robert Kern wrote:
>
> > You might find that the more Pythonic XML modules are better suited to
> > handling mixed content. I've been using lxml and ElementTree quite
> > successfully.
>
> fwiw, here's an ET snippet
Robert Kern wrote:
> You might find that the more Pythonic XML modules are better suited to
> handling mixed content. I've been using lxml and ElementTree quite
> successfully.
fwiw, here's an ET snippet that inserts an anchor element inside
a paragraph element:
# from lxml.etree import * # or
#
Richard Lewis wrote:
> Hello Pythoners,
>
> I'm currently writing some Python to manipulate a semi-structured XML
> document. I'm using DOM (minidom) and I've got working code for
> transforming the document to HTML files and for adding the 'structured'
> elements which populate the higher regions
On Fri, 26 Aug 2005 12:13:10 +0200, "Diez B. Roggisch"
<[EMAIL PROTECTED]> said:
> Richard Lewis wrote:
> >
> > I admit I haven't tried very much code yet, but I'm not sure how I'm
> > going to handle situations like: the user wants to insert a link in the
> > middle of a paragraph. How can I use
Richard Lewis wrote:
>
> I admit I haven't tried very much code yet, but I'm not sure how I'm
> going to handle situations like: the user wants to insert a link in the
> middle of a paragraph. How can I use the DOM to insert a node into the
> middle of some text? Am I right in thinking that the DO
Hello Pythoners,
I'm currently writing some Python to manipulate a semi-structured XML
document. I'm using DOM (minidom) and I've got working code for
transforming the document to HTML files and for adding the 'structured'
elements which populate the higher regions of the tree (i.e. near the
root)