XML processing question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rahul

    XML processing question

    Hi,

    I want to do the following

    <A>
    <B attr1="1" attr2="2">
    ............... ..
    </B>
    <B attr1="4" attr2="5">
    ............... ..
    </B>

    ............... .......
    <B attr1="1" attr2="2">
    <repeat attr1="1" attr2="2 // Here I want to insert the
    first <Belement which had attr=1 and attr=2
    </B>
    </A>

    The problem is to replace the <repeatelemen t with the sibling of its
    parent (repeat will always be done for the sibling of parent of
    repeat) which has the given attribute values.

    Can I do this in DOM, or I need to pre process the XML using XSD.

    Thanks in advance
    Rahul
Working...