Sax解析遇到&字符,会分段,如1&2;会分成三段1,&,2;在赋值时加判断即可
public void setMs(String ms) { if ("&".equals(ms)) { this.ms += ms; append = true; return; } if (append) { this.ms += ms; append = false; } else { this.ms = ms; } }
Sax解析遇到&字符,会分段,如1&2;会分成三段1,&,2;在赋值时加判断即可
public void setMs(String ms) { if ("&".equals(ms)) { this.ms += ms; append = true; return; } if (append) { this.ms += ms; append = false; } else { this.ms = ms; } }