do inesessary need describe tags every time? how can take text "340.00 гр"
<param name="Вес">340.00 гр</param>
try describe next nested xml: http://ufa.farfor.ru/getyml/?key=ukaxxejyzn
@root(name = "yml_catalog", strict = false) public class offersresponse { @path("shop/offers") @elementlist(entry = "offer",inline = true) private static arraylist<offer> offerlist; public arraylist<offer> getofferlist() { return offerlist; } } @root(name = "offer") public class offer { @element(required = false, name = "url") private string url; @element(required = false, name = "name") private string name; @element(required = false, name = "price") private string price; @element(required = false, name = "description") private string description; @element(required = false, name = "picture") private string picture; @element(required = false, name = "categoryid") private string categoryid; @element(required = false, name = "param") private string param; }
09-02 14:31:21.064 28998-28998/com.example.pavel.lesson8 d/tag: onfailure: java.lang.runtimeexception: org.simpleframework.xml.core.attributeexception: attribute 'id' not have match in class com.example.pavel.lesson8.models.offer @ line 23
parsing in java super, same parsing in python excellent,my personal advice use python html , other files parsing . because , there many libraries there work , instantly
Comments
Post a Comment