fork download
  1. def xmlString = """<ApiRootContext xmlns="http://s...content-available-to-author-only...t.org/" xmlns:i="http://w...content-available-to-author-only...3.org/2001/XMLSchema-instance">
  2. <ApiHeader xmlns:a="http://s...content-available-to-author-only...t.org/20/0/dbfasdjk.Context">
  3. <a:Duration>2218.3778</a:Duration>
  4. <a:EndTime>2017-09-15T10:13:26.4970511-04:00</a:EndTime>
  5. <a:RequestGuid>c0594d5b-4f15-4fc0-9efc-f574492796f8</a:RequestGuid>
  6. <a:RequestStatus>Eligibility</a:RequestStatus>
  7. <a:StartTime>2017-09-15T10:13:24.2782836-04:00</a:StartTime>
  8. </ApiHeader>
  9. <QuoteContext xmlns:a="http://s...content-available-to-author-only...i.Context">
  10. <a:HomeOwners>
  11. <a:DisplayOnlyData/>
  12. <a:PolicyData/>
  13. <a:QuoteData>
  14. <a:AdditionalInterestList xmlns:b="http://s...content-available-to-author-only...d.Context"/>
  15. <a:approxFairMarketValue>482678.00</a:approxFairMarketValue>
  16. <a:dateOfBirth>1979-04-20T00:00:00</a:dateOfBirth>
  17. <a:effectiveDateOfPolicy>2017-09-23T00:00:00</a:effectiveDateOfPolicy>
  18. <a:firstName>Wendi</a:firstName>
  19. <a:yearOfConstruction>1978</a:yearOfConstruction>
  20. </a:QuoteData>
  21. <a:QuoteHeader>
  22. <a:Channel>Direct_Web</a:Channel>
  23. <a:CompleteQuoteFlag>false</a:CompleteQuoteFlag>
  24. <a:QuoteStatus>dafvnadk</a:QuoteStatus>
  25. <a:SessionHash>adfnadjfkajdvnkdn</a:SessionHash>
  26. </a:QuoteHeader>
  27. <a:QuoteOffers/>
  28. </a:HomeOwners>
  29. </QuoteContext>
  30. </ApiRootContext>"""
  31. def xml = new XmlSlurper().parseText(xmlString)
  32. assert xml.'**'.findAll { it.name() == 'approxFairMarketValue'}.size() > 0, 'approxFairMarketValue element not found'
Success #stdin #stdout 0.94s 4456448KB
stdin
Standard input is empty
stdout
Standard output is empty