the dom model, currently only provides Append method. but the all members of model are exported. so it should be possible to write delete by removing node from slice and setting its parent to null.
- santhosh On Mon, Feb 15, 2021 at 5:00 AM Tong Sun <suntong...@gmail.com> wrote: > Thank you Santhosh! > > Can the https://github.com/santhosh-tekuri/xpath model edit or delete > elements, apart from locating them? > If so, are there any ready-made examples/blogs etc that I can refer to? > > Thx! > > On Sun, Feb 14, 2021 at 4:28 PM Santhosh Kumar T > <santhosh.tek...@gmail.com> wrote: > > > > You can try https://github.com/santhosh-tekuri/xpath. it uses > https://github.com/santhosh-tekuri/xpath as model. > > > > BTW, I am author of the above projects > > > > - santhosh > > > > On Friday, February 12, 2021 at 10:30:57 PM UTC+5:30 sunto...@gmail.com > wrote: > >> > >> Thanks Steve, > >> > >> That's what I thought, but on taking a closer look, especially the > getting to the `following-sibling` part, I didn't find any API that I can > make use of out of the box. Hence -- > >> > >> https://github.com/beevik/etree/issues/99 > >> > >> Could you elaborate on how to get to the `following-sibling` part of a > given element for etree please? Using > http://zvon.org/comp/r/tut-XPath_1.html#Pages~Following-sibling_axis as > the example, in either place will do. thx > >> > >> > >> On Thursday, February 11, 2021 at 7:17:40 PM UTC-5 > st...@rothskeller.net wrote: > >>> > >>> github.com/beevik/etree does much of what you're looking for. > >>> Steve > >>> > >>> On Thursday, February 11, 2021 at 1:10:51 PM UTC-8 sunto...@gmail.com > wrote: > >>>> > >>>> Is there any Go library that allow certain following-sibling > manipulation? > >>>> > >>>> Specifically, I want to, > >>>> > >>>> locate an xml node via XPath > >>>> delete its following-sibling > >>>> > >>>> More or less like this, > http://zvon.org/comp/r/tut-XPath_1.html#Pages~Following-sibling_axis, but > to delete the node, instead of just locating it. > >>>> > >>>> thx > >>>> > >>>> > >>>> > > -- > > You received this message because you are subscribed to a topic in the > Google Groups "golang-nuts" group. > > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/golang-nuts/X_Di8cLEncU/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > golang-nuts+unsubscr...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/e3ad6d21-07aa-41c7-93d1-f68d50018645n%40googlegroups.com > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABv5LKX4HEL-wRd20kx44xkZvgYEwri59sQxW6GocYq5HXyieg%40mail.gmail.com.