(String strXml)
| 28 | } |
| 29 | |
| 30 | public static Element getRoot(String strXml){ |
| 31 | SAXReader sax = new SAXReader(); |
| 32 | Element root = null; |
| 33 | try { |
| 34 | Document document = sax.read(new ByteArrayInputStream(strXml.getBytes())); |
| 35 | root = document.getRootElement();// 获取根节点 |
| 36 | }catch (Exception e){ |
| 37 | e.printStackTrace(); |
| 38 | } |
| 39 | return root; |
| 40 | } |
| 41 | } |
no outgoing calls
no test coverage detected