Hello all,

I'm a bit stuck in trying to achieve this with XmlObjects and XmlCursor.
Imagine the following scenario:

    <child>Some text</child>

I want to insert a new element AFTER the child element.

    <child>Some text</child>
    <!-- New element here! -->

I don't necessarily know anything about the child element. It might have
child text like the example above. It might not. It might have child
elements, it might not. It might have siblings, it might not. Here's where
I'm stuck:

// XmlObject representing parent.
XmlObject parent = ...;

XmlCursor parentCursor = parent.newCursor();

// Now I'm at the START token for the child element.

>From here, how do I reliably get the cursor past </child> or <child/>?
Basically I'm at the start of <child> and want to be right past the end of
that element.



Reply via email to