Created
May 24, 2013 13:50
-
-
Save edipofederle/5643652 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| private Node getReference(String profileName, String tagName){ | |
| NodeList elements = docUml.getElementsByTagName("profileApplication"); | |
| for (int i = 0; i < elements.getLength(); i++) { | |
| NodeList childs = (elements.item(i).getChildNodes()); | |
| for (int j = 0; j < childs.getLength(); j++) { | |
| if(childs.item(j).getNodeName().equalsIgnoreCase("eAnnotations")){ | |
| for (int k = 0; k < childs.item(j).getChildNodes().getLength(); k++) { | |
| if(childs.item(j).getChildNodes().item(k).getNodeName().equalsIgnoreCase("references")){ | |
| NodeList eAnnotationsChilds = childs.item(j).getChildNodes(); | |
| for (int l = 0; l < eAnnotationsChilds.getLength(); l++) { | |
| if(eAnnotationsChilds.item(l).getNodeName().equalsIgnoreCase("references") | |
| && (eAnnotationsChilds.item(l).getAttributes().getNamedItem("href").getNodeValue().contains(profileName))){ | |
| return eAnnotationsChilds.item(l); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return null; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment