I think this requires some DTD interpretation, and requirements for that could be more complicated than for the below! e.g. A then B, OR, C then D etc. You won't be able to do this sort of thing in xmltask as far as I can easily see :-(

Maarten Coene wrote:
Hi,

I want to insert an element in an existing XML file. Since the XML file is attached to a DTD, I have to insert the element at the correct position. The problem is that most elements are optional, so I'm not sure that they will be present in the XML file. How can I insert the new element at the correct position?

example, say that the DTD has the following declaration:
<!ELEMENT alphabet (a?,b?,c?,d?,....,x?,y?,z?)>

I have the following XML:
<alphabet>
   <a/>
   <d/>
   <x/>
</alphabet>

I want to insert the <f /> element, how can I accomplish this when I don't know which elements are present in the XML file ?

regards,
Maarten

-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd         brian @ oopsconsultancy.com
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012


Reply via email to