• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

how to read info from a class which has xml data

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can i know how to extract pass through parameters from a class. this class parses a xml file and has that data. below is the class

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name="indexQuery")
public class Item implements Serializable {

private String id = UUID.randomUID().toString();

@XmlElementWrapper(name = "itemParameters")
@XmlElement(name = "itemField")
private List<ItemField> itemFields = new ArrayList<ItemField>(); // 'field' elements in this query

private Map<String, String> passThroughInfo = new HashMap<String, String>(); // 'field' element name/value pairs

public String getId() {
return id;
}


public List<ItemField> getItemFields() {
return itemFields;
}
public void setItemFields(List<ItemField> itemFields) {
this.itemFields = itemFields;
}
public Map<String, String> getPassThruInfo() {
return passThruInfo;
}
public void setPassThroughInfo(Map<String, String> passThroughInfo) {
this.passThroughInfo = passThroughInfo;
}
}

below is the sample xml..

<?xml version="1.0"?>
<inquiry priority ="5">
<object name="xyz" />
<indexquery range="N">
<field name="z" />
<field name="p" low="3" />
</indexquery>
<indexquery range="N">
<field name="g" />
<field name="m" low="3"/>
</indexquery>
 
A timing clock, fuse wire, high explosives and a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic