none
How to add node to xml dynamically RRS feed

  • Question

  • Hi All

    I need help in adding tag to the xml dynamically based on some condition.

    The xml structure is like this:

    <root>

                    <Level1>

                                    <Level2>

                                                    <Child>A</Child >

                                                    < Child >C</Child >

                                                    < Child >G</Child >

                                    </Level2>

                    </Level1>

    </root>

    In the Level2 node, i want to check whether Node Value for child are consecutive or not. If they are not, then add as many as blank nodes.

    For above example output should be:

    <root>

                    <Level1>

                                    <Level2>

                                                    <Child>A</Child >

                                                    <Child />

                                                    < Child >C</Child >

                                                    <Child />

                                                    <Child />

                                                    <Child />

                                                    < Child >G</Child >

                                    </Level2>

                    </Level1>

    </root>

    As B,D,E Was missing so i need to insert blank value in their place.

    Please  help.


    Deepak Sanghi Happy Biztalking.........

    Sunday, June 24, 2012 6:43 AM

Answers

All replies