Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-16"?>
- <Records count="22321">
- <Metadata>
- <FieldDefinitions>
- <FieldDefinition id="4444" name="name" />
- <FieldDefinition id="5555" name="hair_color" />
- <FieldDefinition id="6666" name="shoe_size" />
- <FieldDefinition id="7777" name="last_comment"/>
- <!-- around 100 more of these -->
- </FieldDefinitions>
- </Metadata>
- <!-- Several complex object we don't care about here -->
- <Record contentId="88484848475" >
- <Field id="4444" type="9">
- <Reference id="56765">Joe Bloggs</Reference>
- </Field>
- <Field id="5555" type="4">
- <ListValues>
- <ListValue id="290711" displayName="Red">Red</ListValue>
- </ListValues>
- </Field>
- <Field id="6666" type="4">
- <ListValues>
- <ListValue id="24325" displayName="10">10</ListValue>
- </ListValues>
- </Field>
- <Field id="7777" type="1">
- <P>long form text here with escaped XML here too
- don't need to process or derefernce the xml here,
- just need to get it as string in my pojo<P>
- </Field>
- </Record>
- <Record><!-- another record obj here with same fields --> </Record>
- <Record><!-- another record obj here with same fields--> </Record>
- <!-- thousands more records in the sameish format -->
- </Records>
- List<Record> unmarhsalledRecords = this.getRecordsFromXML(stringOfXmlShownAbove)
- public class Record {
- private String name;
- private String hairColor;
- private String shoeSize;
- private String lastComment;
- //lots more fields
- //getters and setters for these fields
- }
Add Comment
Please, Sign In to add comment