Java Code Examples for com.sun.org.apache.xml.internal.security.utils.XMLUtils#selectNode()
The following examples show how to use
com.sun.org.apache.xml.internal.security.utils.XMLUtils#selectNode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TransformC14NExclusiveWithComments.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI() ).getInclusiveNamespaces(); } Canonicalizer20010315ExclWithComments c14n = new Canonicalizer20010315ExclWithComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 2
Source File: TransformC14NExclusiveWithComments.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI() ).getInclusiveNamespaces(); } Canonicalizer20010315ExclWithComments c14n = new Canonicalizer20010315ExclWithComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 3
Source File: TransformC14NExclusive.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces(); } Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); if (os != null) { output.setOutputStream(os); } return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 4
Source File: TransformC14NExclusive.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces(); } Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); if (os != null) { output.setOutputStream(os); } return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 5
Source File: TransformC14NExclusive.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces(); } Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); if (os != null) { output.setOutputStream(os); } return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 6
Source File: XPathFilterCHGPContainer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); }
Example 7
Source File: TransformC14NExclusive.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces(); } Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); if (os != null) { output.setOutputStream(os); } return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 8
Source File: XPathFilterCHGPContainer.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); }
Example 9
Source File: XPathFilterCHGPContainer.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); }
Example 10
Source File: TransformC14NExclusive.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces(); } Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); if (os != null) { output.setOutputStream(os); } return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 11
Source File: XPathFilterCHGPContainer.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); }
Example 12
Source File: XPathFilterCHGPContainer.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); }
Example 13
Source File: TransformC14NExclusive.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces(); } Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); if (os != null) { output.setOutputStream(os); } return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 14
Source File: TransformC14NExclusiveWithComments.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI() ).getInclusiveNamespaces(); } Canonicalizer20010315ExclWithComments c14n = new Canonicalizer20010315ExclWithComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 15
Source File: XPathFilterCHGPContainer.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); }
Example 16
Source File: TransformC14NExclusive.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI()).getInclusiveNamespaces(); } Canonicalizer20010315ExclOmitComments c14n = new Canonicalizer20010315ExclOmitComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); if (os != null) { output.setOutputStream(os); } return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 17
Source File: TransformC14NExclusiveWithComments.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI() ).getInclusiveNamespaces(); } Canonicalizer20010315ExclWithComments c14n = new Canonicalizer20010315ExclWithComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 18
Source File: TransformC14NExclusiveWithComments.java From hottub with GNU General Public License v2.0 | 5 votes |
protected XMLSignatureInput enginePerformTransform( XMLSignatureInput input, OutputStream os, Transform transformObject ) throws CanonicalizationException { try { String inclusiveNamespaces = null; if (transformObject.length( InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES) == 1 ) { Element inclusiveElement = XMLUtils.selectNode( transformObject.getElement().getFirstChild(), InclusiveNamespaces.ExclusiveCanonicalizationNamespace, InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES, 0 ); inclusiveNamespaces = new InclusiveNamespaces( inclusiveElement, transformObject.getBaseURI() ).getInclusiveNamespaces(); } Canonicalizer20010315ExclWithComments c14n = new Canonicalizer20010315ExclWithComments(); if (os != null) { c14n.setWriter(os); } byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces); XMLSignatureInput output = new XMLSignatureInput(result); return output; } catch (XMLSecurityException ex) { throw new CanonicalizationException("empty", ex); } }
Example 19
Source File: XPathFilterCHGPContainer.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); }
Example 20
Source File: XPathFilterCHGPContainer.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Method getXStr * * @param type * @return The Xstr */ private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode( this.constructionElement.getFirstChild(), this.getBaseNamespace(), type, 0 ); return XMLUtils.getFullTextChildrenFromElement(xElem); }