Hello all,

I really hope that this make sense!! :)

How do you figure out where you are in the tree? If I want to write some XML
tags to a tree that contains the multiple elements how do I figure out what
element I want to write to?

Example

I want to write the following:

<A1>one</A1>
<A2>two</A2>

I want to write it to the SECOND /PHIMPORT/IMPORTINFORMATION/DETAIL/
section:

Start with this..

<PHIMPORT>
        <IMPORTINFORMATION>
                <DETAIL>
                        <INDEXKEY>
                                <A1>0</A1>
                        </INDEXKEY>
                </DETAIL>
                <DETAIL>
                        <INDEXKEY>
                                <A0>SDFK</A0>
                        </INDEXKEY>
                </DETAIL>
        </IMPORTINFORMATION>
</PHIMPORT>

End up with this....

<PHIMPORT>
        <IMPORTINFORMATION>
                <DETAIL>
                        <INDEXKEY>
                                <A1>0</A1>
                        </INDEXKEY>
                </DETAIL>
                <DETAIL>
                        <INDEXKEY>
                                <A0>SDFK</A0>
                                <A1>one</A1>
                                <A2>two</A2>
                        </INDEXKEY>
                </DETAIL>
        </IMPORTINFORMATION>
</PHIMPORT>


Thanks for the help....


A. Frank Sharpless
Manager, Application Development
Paperhost.Com, Inc.
[EMAIL PROTECTED]
770.998.9172.611


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to