문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
groovy:xml [2014/02/12 10:35] kwon37xi |
groovy:xml [2016/12/16 22:45] kwon37xi |
||
---|---|---|---|
줄 2: | 줄 2: | ||
===== XMLParser ===== | ===== XMLParser ===== | ||
- | [[http:// | + | * [[http:// |
+ | * [[http:// | ||
==== Namespace ==== | ==== Namespace ==== | ||
[[http:// | [[http:// | ||
- | Namespace가 존재할 경우 각 노드의 이름 구조가 달라진다. '' | + | Namespace가 존재할 경우 각 노드의 이름([[http:// |
<code groovy> | <code groovy> | ||
- | def pom = new XmlParser(false, true).parse(new File(' | + | def pom = new XmlParser().parse(new File(' |
def ns = new groovy.xml.Namespace(' | def ns = new groovy.xml.Namespace(' | ||
- | def items = pom[ns.dependencies][ns.dependency][ns.scope].findAll { it.text() == " | + | def items = pom[ns.dependencies][ns.dependency][ns.scope].findAll { |
+ | | ||
+ | }.each { | ||
+ | | ||
+ | } | ||
</ | </ | ||
+ | ===== XML Builder ===== | ||
+ | * '' | ||
+ | * '' | ||
+ | ===== Pretty Print ===== | ||
+ | * [[http:// | ||
+ | <code groovy> | ||
+ | println XmlUtil.serialize(xmlDocument) // 문자열 혹은 SteramingMarkupBuilder 객체 등. | ||
+ | </ | ||
+ | |||
+ | ===== DOMBuilder ===== | ||
+ | * [[http:// | ||