Code example for Element

Methods: getAttributeNode

0
		NodeList list = XPathManager.getManager().evaluateNodeSet(null,
				document, "//transformer[@type='pipeline']", null);
		Element transformer = (Element) list.item(0);
 
		IXMLReference referenceFromRegisrty = XMLReferencesUtil
				.getXMLReference(transformer.getAttributeNode("src"),
						PIPELINES_CONTENT_TYPE[0]);
		assertNotNull(referenceFromRegisrty);
 
	} 
 
	public void testXMLReferenceInversed() throws Exception { 
 
		IXMLReference reference = XMLReferencesUtil.createXMLReference(
				"/pipelines/pipeline/transformer[@type='pipeline']", "@src", 
				null, null, PIPELINES_CONTENT_TYPE, null, null);
		IXMLReferencePath to = reference.createToXML("", null,
				"/pipelines/pipeline", "@uri", null, null, null, null, null); 
		reference.addTo(to);
 
		XMLReferencesUtil.registerXMLReference(reference);