Hi Sagara, I think we can't compare the two and say which one is better. But using the DOM parser we can solve our main concern, which is having to install a dependency while the script is running. Since the user will be using the wso2 IS pack, we can assume that Java will be already installed on user's machine and therefore no extra installations will be required for the implementation using the DOM parser. Also, this implementation will be reusable in anywhere we need to extract a value of an XML tag.
Most importantly in my previous approach, I had to pretty-print the SOAP response to another file as the grep command couldn't extract the value from an unformatted file. But using the DOM parser I was able to extract the value directly from the unformatted file. So I think using the DOM parser would be a more suitable solution for our requirement. Thank you On Mon, Jan 15, 2018 at 2:45 PM, Sagara Gunathunga <[email protected]> wrote: > > > On Mon, Jan 15, 2018 at 2:43 PM, Nipuni Bhagya <[email protected]> wrote: > >> Hi all, >> >> I have overcome aforementioned problem by implementing my script in such >> a way that it extracts the value of required XML tag using the Java DOM >> parser. Since this approach is more straightforward and most importantly >> doesn't require any extra dependencies, I believe this would be a more >> appropriate solution for our requirement. >> > > Do you think is it better than xmllint, can you explain ? > > Thanks ! > >> >> Thank you all for the support. >> >> -- >> >> >> >> *Kind Regards,Nipuni Bhagya* >> >> *Software Engineering Intern* >> *WSO2* >> >> >> >> *Mobile : +94 0779028904 <+94%2077%20767%201807>* >> > > > > -- > Sagara Gunathunga > > Director; WSO2, Inc.; http://wso2.com > Linkedin; http://www.linkedin.com/in/ssagara > Blog ; http://ssagara.blogspot.com > Mobile : +9471 <+94%2071%20565%209887>2149951 > > -- *Kind Regards,Nipuni Bhagya* *Software Engineering Intern* *WSO2* *Mobile : +94 0779028904 <+94%2077%20767%201807>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
