Skip to content

Instantly share code, notes, and snippets.

@jeanlaurent
Created October 1, 2010 09:45
Show Gist options
  • Save jeanlaurent/605994 to your computer and use it in GitHub Desktop.
Save jeanlaurent/605994 to your computer and use it in GitHub Desktop.
package foo.bar;
import com.mycila.xmltool.XMLDoc;
import com.mycila.xmltool.XMLTag;
public class PoiBuilder {
public Poi buildFromXml(String xml) {
XMLTag xmlTag = XMLDoc.from(xml, true);
return new Poi(xmlTag.getText("//xml/address/way"), xmlTag.getText("//xml/address/town"));
}
}
@jeanlaurent
Copy link
Author

Reading xml without headache with XmlTool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment