Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: XML Date: Tue, 16 Aug 2016 16:13:22 -0400 Organization: Aioe.org NNTP Server Lines: 25 Message-ID: References: <34f5f605-db80-441c-9730-ceecf445c1a8@googlegroups.com> <0176078c-ab98-4e66-ba3e-b14ee88b58e0@googlegroups.com> <487a50aa-8e4b-460a-9824-bd23c26d4c02@googlegroups.com> <00fae8a8-dc01-435f-9f33-e5a5055d93df@googlegroups.com> <9c174795-1c98-46f0-bbac-179581cd39a2@googlegroups.com> NNTP-Posting-Host: 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:35359 On 8/16/2016 2:49 PM, Eric Douglas wrote: > On Saturday, August 13, 2016 at 3:38:21 PM UTC-4, Arne Vajhøj wrote: >> Searching for various data is easy using the new Java 8 streams: >> >> // search >> Data o1 = data2.getList().stream().filter(item -> item.getIv() == >> 456).findFirst().get(); >> Data o2 = data2.getList().stream().filter(item -> item instanceof >> DataA && ((DataA)item).getSv().equals("ABC")).findFirst().get(); >> > > I haven't used this stream feature yet. It is a new thing in Java 8. Some may say the new thing in Java 8. > Is that doing the same thing this guy is doing? > http://blog.bdoughan.com/2012/08/handle-middle-of-xml-document-with-jaxb.html Not at all. That link shows how to mix StAX and JAXB. Arne