From: Jimmy Z. <jz...@xi...> - 2016-05-01 00:32:15
|
After some polishing I made your code work... see my attachment, I have a request: would you please post a question on stack overflow, so I can respond, and the content of our correspondence can thus be made available to public and help them as well ----- Original Message ----- From: Suresh Naidu To:"Jimmy Zhang" Cc: Sent:Sun, 1 May 2016 01:35:36 +0200 Subject:Re: [Vtd-xml-users] Suggestion in Removing the spaces after Removing the Element Dear Zhang, I have tried with expandwhitespaces method with multiple ways,but i could not get the output. I have not find much examples about its usage. Can you check and let me know if i am using it correctly or not I have attached the source code and file used. Thanks border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">Yes, there is, in version 2.12, there is a method called expandWhiteSpace in VTDNav, it works like the following public final long expandWhiteSpaces(long l)New in v2.12 This method will take a segment descriptor and return a new descriptor that includes all the leading and trailing white spaces around the input segment It has no effect on CDATA A typical usage would be 'expandWhiteSpaces(getElementFragment())'Parameters:l - upper 32 bits length of the segment, lower 32 bits offset of the segment, unit is byte offsetReturns:a long 64 bit segment descriptorThrows:NavException [2] ----- Original Message ----- From: Suresh Naidu To:"Jimmy Zhang" Cc: Sent:Sat, 30 Apr 2016 06:23:38 +0200 Subject:Re: [Vtd-xml-users] Suggestion in Removing the spaces after Removing the Element Thanks zhang for your reply.It [5] is not a show stopper..but the requirement from client is to remove that spaces...is there an option to do that with vtd- xml. Thanks border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">How big a deal is it ? cosmetic or show stopping? ----- Original Message ----- From: Suresh Naidu To: Cc: Sent:Fri, 29 Apr 2016 10:40:39 +0200 Subject:[Vtd-xml-users] Suggestion in Removing the spaces after Removing the Element Dears, We are using VTD XML for our application.Can [10] you help us in solving the issue in our application. The issue is: input xml: suresh Address output xml: Address But i want the output to be: Address When i remove the element with xmlmodifier it is creating an empty space(new line) for the removed element. Is there any possibility to remove that vtdxml? Thanks & Regards,G . Suresh Naidu Links: ------ [1] mailto:jz...@xi... [2] http://vtd-xml.sourceforge.net/javadoc/com/ximpleware/NavException.html [3] mailto:sur...@gm... [4] mailto:jz...@xi... [5] http://reply.It [6] http://G.Suresh [7] mailto:jzhang@ximplewarecom [8] mailto:sur...@gm... [9] mailto:vtd...@li... [10] http://application.Can |