Guest User

Untitled

a guest
Mar 22nd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-16"?>
  2. <Records count="22321">
  3. <Metadata>
  4. <FieldDefinitions>
  5. <FieldDefinition id="4444" name="name" />
  6. <FieldDefinition id="5555" name="hair_color" />
  7. <FieldDefinition id="6666" name="shoe_size" />
  8. <FieldDefinition id="7777" name="last_comment"/>
  9. <!-- around 100 more of these -->
  10. </FieldDefinitions>
  11. </Metadata>
  12.  
  13. <!-- Several complex object we don't care about here -->
  14.  
  15. <Record contentId="88484848475" >
  16. <Field id="4444" type="9">
  17. <Reference id="56765">Joe Bloggs</Reference>
  18. </Field>
  19.  
  20. <Field id="5555" type="4">
  21. <ListValues>
  22. <ListValue id="290711" displayName="Red">Red</ListValue>
  23. </ListValues>
  24. </Field>
  25.  
  26. <Field id="6666" type="4">
  27. <ListValues>
  28. <ListValue id="24325" displayName="10">10</ListValue>
  29. </ListValues>
  30. </Field>
  31.  
  32. <Field id="7777" type="1">
  33. <P>long form text here with escaped XML here too
  34. don't need to process or derefernce the xml here,
  35. just need to get it as string in my pojo<P>
  36. </Field>
  37. </Record>
  38. <Record><!-- another record obj here with same fields --> </Record>
  39. <Record><!-- another record obj here with same fields--> </Record>
  40. <!-- thousands more records in the sameish format -->
  41. </Records>
  42.  
  43. List<Record> unmarhsalledRecords = this.getRecordsFromXML(stringOfXmlShownAbove)
  44.  
  45. public class Record {
  46. private String name;
  47. private String hairColor;
  48. private String shoeSize;
  49. private String lastComment;
  50. //lots more fields
  51. //getters and setters for these fields
  52. }
Add Comment
Please, Sign In to add comment