Hi Jeong, If u want to insert it after <CNN> than what is the problem in using appendChild() method.Is there any specific things u want to do or what is ur main purpose.
Regards Savita. Jeong Ahn Lee wrote: > thanks, but > > <SOAP-ENV:Envelope> > <SOAP-ENV:Header> > <ABC>aa</ABC> > <BBC>bb</BBC> > <CNN>bb</CNN> > </SOAP-ENV:Header> > <SOAP-ENV:Body>this is body</SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > in the above document, i want to insert after <CNN> > element, if it was before <CNN> i could have used > > public Node insertBefore(Node newChild, > Node refChild) > throws DOMException > > this method which is there org.w3c.dom.Node interface, > there is no method called insertAfter(...), so i want > to know is there any workaround for that. > > regards > > --- Savita <[EMAIL PROTECTED]> wrote: > > Hi Jeong , > > > > As per ur example u want to insert the element after > > CNN then append > > should be good enough but if u want to insert a > > element in between then u > > should know before which element(for ex AAA,or BBB) > > u want to insert the > > element and then u can use insertBefore method to > > insert the element. > > > > Regards > > Savita. > > > > > > > > Jeong Ahn Lee wrote: > > > > > THANKS, > > > > > > but i know how to append an element to a document > > but, > > > i want to know how i can insert an element with in > > an > > > existing xml document, say, i have a xml file i am > > > reading it, and i want to insert an element, how > > can i > > > do that, that is not given in that example. > > > > > > thanks > > > > > > --- Christopher Ebert <[EMAIL PROTECTED]> > > wrote: > > > > > > > > Hi, > > > > > > > > Try looking at sample > > > > ~/samples/dom/DOMGenerate.java. It should > > > > give you everything you need. > > > > > > > > Cheers, > > > > > > > > Chris > > > > > > > > > > > > -----Original Message----- > > > > From: Jeong Ahn Lee > > [mailto:[EMAIL PROTECTED] > > > > Sent: Tuesday, June 18, 2002 2:40 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: How to insert element? > > > > > > > > > > > > Hi all, i have an xml document like below > > > > > > > > <SOAP-ENV:Envelope> > > > > <SOAP-ENV:Header> > > > > <ABC>aa</ABC> > > > > <BBC>bb</BBC> > > > > <CNN>bb</CNN> > > > > </SOAP-ENV:Header> > > > > <SOAP-ENV:Body>this is > > body</SOAP-ENV:Body> > > > > </SOAP-ENV:Envelope> > > > > > > > > in that document, how can i insert an element( > > say > > > > <FOX> ) > > > > after <CNN> element, with in the > > <SOAP-ENV:Header> > > > > element. > > > > > > > > Thanks and Regards > > > > Jeong Ahn > > > > > > > > > > __________________________________________________ > > > > Do You Yahoo!? > > > > Yahoo! - Official partner of 2002 FIFA World Cup > > > > http://fifaworldcup.yahoo.com > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: > > > > [EMAIL PROTECTED] > > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Yahoo! - Official partner of 2002 FIFA World Cup > > > http://fifaworldcup.yahoo.com > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
