Hi,
I want to insert an element at the first position under an element "<root>".
I tried the following:
<insert path="/root" position="under"><![CDATA[<dummy />]]></insert>
-> this inserts the element at the last position
<insert path="/root/*[position() = 1]" position="before"><![CDATA[<dummy />]]></insert>
-> this inserts the element at the first position, but it doesn't work if the <root> element is empty
I would need something like this:
<insert path="/root" position="under-first"><![CDATA[<dummy />]]></insert>
any suggestions?
regards,
Maarten
I want to insert an element at the first position under an element "<root>".
I tried the following:
<insert path="/root" position="under"><![CDATA[<dummy />]]></insert>
-> this inserts the element at the last position
<insert path="/root/*[position() = 1]" position="before"><![CDATA[<dummy />]]></insert>
-> this inserts the element at the first position, but it doesn't work if the <root> element is empty
I would need something like this:
<insert path="/root" position="under-first"><![CDATA[<dummy />]]></insert>
any suggestions?
regards,
Maarten