Removing XML node using Java -


I want to remove the XML node from XML based on jQuery results. I have XML:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; List & gt; & Lt; Member Name = "James" & gt; & Lt; Friendlist & gt; & Lt; Friends & gt; 0001 & lt; / Friends & gt; & Lt; Friends & gt; 0002 & lt; / Friends & gt; & Lt; Friends & gt; 0003 & lt; / Friends & gt; & Lt; / Friendlist & gt; & Lt; / Member & gt; & Lt; Member Name = "Jamie" & gt; & Lt; Friendlist & gt; & Lt; Friends & gt; 0003 & lt; / Friends & gt; & Lt; Friends & gt; 0002 & lt; / Friends & gt; & Lt; Friends & gt; 0001 & lt; / Friends & gt; & Lt; / Friendlist & gt; & Lt; / Member & gt; & Lt; Member Name = "Katie" & gt; & Lt; Friendlist & gt; & Lt; Friends & gt; 0001 & lt; / Friends & gt; & Lt; Friends & gt; 0003 & lt; / Friends & gt; & Lt; Friends & gt; 0004 & lt; / Friends & gt; & Lt; / Friendlist & gt; & Lt; / Member & gt; & Lt; / List & gt;  

I completely & lt; Members & gt; tag, which is equal to 'James' so that XML should look like this

   

I am using the following code to get the node and delete it, but I'm getting an XML as an output. This is not removing XML XML from giving the same XML.

How to use XML and how to remove XML node from XML?

I work with it like this:

  public Remove the square node {public interface projection {@XBDelete ("/ list / member [@name = '{0}']") when deleting the projection (name of the string); } Public Zero Main (string [] algs) {projection projection = new Xb projector (flag te o_ STRING_RENDERS_XML) .io.file ("yourfile.xml"). Read (launch class); Println ("before:" + projection); System.out.println ("After:" + Launch. RemovesMember ("james");}}  

Not sure that reading XML from a file is your setup completed. But how to make several launches (from IOSTrim, Resources, Dom Nodes, Strings ...)


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

c# - WPF Expander overlay used in ItemsControl -

class - Kivy: how to instantiate a dynamic classes in python -