public String getAttributeValue(String ns, String local) { Attr at; if (ns == null || ns.isEmpty()) { at = getCurrentElement().getAttributeNode(local); } else { at = getCurrentElement().getAttributeNodeNS(ns, local); } if (at == null) { return null; } return at.getNodeValue(); }
public String getAttributeValue(String ns, String local) { Attr at; if (ns == null || ns.isEmpty()) { at = getCurrentElement().getAttributeNode(local); } else { at = getCurrentElement().getAttributeNodeNS(ns, local); } if (at == null) { return null; } return at.getNodeValue(); }
public String getAttributeValue(String ns, String local) { Attr at; if (ns == null || ns.equals("")) { at = getCurrentElement().getAttributeNode(local); } else { at = getCurrentElement().getAttributeNodeNS(ns, local); } if (at == null) { return null; } return at.getNodeValue(); }
public String getAttributeValue(String ns, String local) { Attr at; if (ns == null || ns.equals("")) { at = getCurrentElement().getAttributeNode(local); } else { at = getCurrentElement().getAttributeNodeNS(ns, local); } if (at == null) { return null; } return at.getNodeValue(); }
public String getAttributeValue(String ns, String local) { Attr at; if (ns == null || ns.equals("")) { at = getCurrentElement().getAttributeNode(local); } else { at = getCurrentElement().getAttributeNodeNS(ns, local); } if (at == null) { return null; } return at.getNodeValue(); }
public DOMSource read(XMLStreamReader reader) { // Use a DOMSource for now, we should really use a StaxSource/SAXSource though for // performance reasons try { XMLStreamReader reader2 = reader; if (reader2 instanceof DepthXMLStreamReader) { reader2 = ((DepthXMLStreamReader)reader2).getReader(); } if (reader2 instanceof W3CDOMStreamReader) { W3CDOMStreamReader domreader = (W3CDOMStreamReader)reader2; DOMSource o = new DOMSource(domreader.getCurrentElement()); domreader.consumeFrame(); return o; } else { Document document = StaxUtils.read(reader); if (reader.hasNext()) { //need to actually consume the END_ELEMENT reader.next(); } return new DOMSource(document); } } catch (XMLStreamException e) { throw new Fault("COULD_NOT_READ_XML_STREAM_CAUSED_BY", LOG, e, e.getClass().getCanonicalName(), e.getMessage()); } }
public DOMSource read(XMLStreamReader reader) { // Use a DOMSource for now, we should really use a StaxSource/SAXSource though for // performance reasons try { XMLStreamReader reader2 = reader; if (reader2 instanceof DepthXMLStreamReader) { reader2 = ((DepthXMLStreamReader)reader2).getReader(); } if (reader2 instanceof W3CDOMStreamReader) { W3CDOMStreamReader domreader = (W3CDOMStreamReader)reader2; DOMSource o = new DOMSource(domreader.getCurrentElement()); domreader.consumeFrame(); return o; } Document document = StaxUtils.read(reader); if (reader.hasNext()) { //need to actually consume the END_ELEMENT reader.next(); } return new DOMSource(document); } catch (XMLStreamException e) { throw new Fault("COULD_NOT_READ_XML_STREAM_CAUSED_BY", LOG, e, e.getClass().getCanonicalName(), e.getMessage()); } }
public DOMSource read(XMLStreamReader reader) { // Use a DOMSource for now, we should really use a StaxSource/SAXSource though for // performance reasons try { XMLStreamReader reader2 = reader; if (reader2 instanceof DepthXMLStreamReader) { reader2 = ((DepthXMLStreamReader)reader2).getReader(); } if (reader2 instanceof W3CDOMStreamReader) { W3CDOMStreamReader domreader = (W3CDOMStreamReader)reader2; DOMSource o = new DOMSource(domreader.getCurrentElement()); domreader.consumeFrame(); return o; } Document document = StaxUtils.read(reader); if (reader.hasNext()) { //need to actually consume the END_ELEMENT reader.next(); } return new DOMSource(document); } catch (XMLStreamException e) { throw new Fault("COULD_NOT_READ_XML_STREAM_CAUSED_BY", LOG, e, e.getClass().getCanonicalName(), e.getMessage()); } }
public DOMSource read(XMLStreamReader reader) { // Use a DOMSource for now, we should really use a StaxSource/SAXSource though for // performance reasons try { XMLStreamReader reader2 = reader; if (reader2 instanceof DepthXMLStreamReader) { reader2 = ((DepthXMLStreamReader)reader2).getReader(); } if (reader2 instanceof W3CDOMStreamReader) { W3CDOMStreamReader domreader = (W3CDOMStreamReader)reader2; DOMSource o = new DOMSource(domreader.getCurrentElement()); domreader.consumeFrame(); return o; } else { Document document = StaxUtils.read(reader); if (reader.hasNext()) { //need to actually consume the END_ELEMENT reader.next(); } return new DOMSource(document); } } catch (XMLStreamException e) { throw new Fault("COULD_NOT_READ_XML_STREAM_CAUSED_BY", LOG, e, e.getClass().getCanonicalName(), e.getMessage()); } }
fault = dr.getCurrentElement(); dr.consumeFrame(); } else if (mainNode != null) {
fault = dr.getCurrentElement(); dr.consumeFrame(); } else if (mainNode != null) {