Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 11 java.xml.jmod - XML Module
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module.
JDK 11 XML module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.xml.jmod.
JDK 11 XML module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 XML module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.xml.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/org/apache/xml/internal/utils/AttList.java
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.sun.org.apache.xml.internal.utils;
import org.w3c.dom.Attr;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.xml.sax.Attributes;
/**
* Wraps a DOM attribute list in a SAX Attributes.
* @xsl.usage internal
*/
public class AttList implements Attributes
{
/** List of attribute nodes */
NamedNodeMap m_attrs;
/** Index of last attribute node */
int m_lastIndex;
// JAXP Uses Xerces without setting the namespace processing to ON!
// DOM2Helper m_dh = new DOM2Helper();
/**
* Constructor AttList
*
* @param attrs List of attributes this will contain
*/
public AttList(NamedNodeMap attrs)
{
m_attrs = attrs;
m_lastIndex = m_attrs.getLength() - 1;
}
/**
* Get the number of attribute nodes in the list
*
*
* @return number of attribute nodes
*/
public int getLength()
{
return m_attrs.getLength();
}
/**
* Look up an attribute's Namespace URI by index.
*
* @param index The attribute index (zero-based).
* @return The Namespace URI, or the empty string if none
* is available, or null if the index is out of
* range.
*/
public String getURI(int index)
{
String ns = DOM2Helper.getNamespaceOfNode(((Attr) m_attrs.item(index)));
if(null == ns)
ns = "";
return ns;
}
/**
* Look up an attribute's local name by index.
*
* @param index The attribute index (zero-based).
* @return The local name, or the empty string if Namespace
* processing is not being performed, or null
* if the index is out of range.
*/
public String getLocalName(int index)
{
return DOM2Helper.getLocalNameOfNode(((Attr) m_attrs.item(index)));
}
/**
* Look up an attribute's qualified name by index.
*
*
* @param i The attribute index (zero-based).
*
* @return The attribute's qualified name
*/
public String getQName(int i)
{
return ((Attr) m_attrs.item(i)).getName();
}
/**
* Get the attribute's node type by index
*
*
* @param i The attribute index (zero-based)
*
* @return the attribute's node type
*/
public String getType(int i)
{
return "CDATA"; // for the moment
}
/**
* Get the attribute's node value by index
*
*
* @param i The attribute index (zero-based)
*
* @return the attribute's node value
*/
public String getValue(int i)
{
return ((Attr) m_attrs.item(i)).getValue();
}
/**
* Get the attribute's node type by name
*
*
* @param name Attribute name
*
* @return the attribute's node type
*/
public String getType(String name)
{
return "CDATA"; // for the moment
}
/**
* Look up an attribute's type by Namespace name.
*
* @param uri The Namespace URI, or the empty String if the
* name has no Namespace URI.
* @param localName The local name of the attribute.
* @return The attribute type as a string, or null if the
* attribute is not in the list or if Namespace
* processing is not being performed.
*/
public String getType(String uri, String localName)
{
return "CDATA"; // for the moment
}
/**
* Look up an attribute's value by name.
*
*
* @param name The attribute node's name
*
* @return The attribute node's value
*/
public String getValue(String name)
{
Attr attr = ((Attr) m_attrs.getNamedItem(name));
return (null != attr)
? attr.getValue() : null;
}
/**
* Look up an attribute's value by Namespace name.
*
* @param uri The Namespace URI, or the empty String if the
* name has no Namespace URI.
* @param localName The local name of the attribute.
* @return The attribute value as a string, or null if the
* attribute is not in the list.
*/
public String getValue(String uri, String localName)
{
Node a=m_attrs.getNamedItemNS(uri,localName);
return (a==null) ? null : a.getNodeValue();
}
/**
* Look up the index of an attribute by Namespace name.
*
* @param uri The Namespace URI, or the empty string if
* the name has no Namespace URI.
* @param localPart The attribute's local name.
* @return The index of the attribute, or -1 if it does not
* appear in the list.
*/
public int getIndex(String uri, String localPart)
{
for(int i=m_attrs.getLength()-1;i>=0;--i)
{
Node a=m_attrs.item(i);
String u=a.getNamespaceURI();
if( (u==null ? uri==null : u.equals(uri))
&&
a.getLocalName().equals(localPart) )
return i;
}
return -1;
}
/**
* Look up the index of an attribute by raw XML 1.0 name.
*
* @param qName The qualified (prefixed) name.
* @return The index of the attribute, or -1 if it does not
* appear in the list.
*/
public int getIndex(String qName)
{
for(int i=m_attrs.getLength()-1;i>=0;--i)
{
Node a=m_attrs.item(i);
if(a.getNodeName().equals(qName) )
return i;
}
return -1;
}
}
⏎ com/sun/org/apache/xml/internal/utils/AttList.java
Or download all of them as a single archive file:
File name: java.xml-11.0.1-src.zip File size: 4876106 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.xml.crypto.jmod - XML Crypto Module
2020-08-25, ≈690🔥, 0💬
Popular Posts:
JDK 17 jdk.httpserver.jmod is the JMOD file for JDK 17 HTTP Server module. JDK 17 HTTP Server module...
JDK 11 jdk.jartool.jmod is the JMOD file for JDK 11 JAR tool, which can be invoked by the "jar" comm...
JDK 11 jdk.management.jmod is the JMOD file for JDK 11 Management module. JDK 11 Management module c...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
JDK 17 jdk.jlink.jmod is the JMOD file for JDK 17 JLink tool, which can be invoked by the "jlink" co...