Created
May 12, 2013 23:01
-
-
Save sethrylan/5565285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document document = XMLUtils.getDom(fhirXmlFeedString); | |
DocumentTraversal traversal = (DocumentTraversal) document; | |
NodeIterator iterator = traversal.createNodeIterator(document.getDocumentElement(), NodeFilter.SHOW_ELEMENT, null, true); | |
for (Node node = iterator.nextNode(); node != null; node = iterator.nextNode()) { | |
String tagname = ((Element)node).getTagName(); | |
if (tagname.equals("totalResults")) { | |
assertEquals("1", ((Element)node).getTextContent()); | |
// logger.debug("id=" + ((Element)n).getAttribute("id")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment