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:
Rhino JavaScript Java Library Source Code
Rhino JavaScript Java Library is an open-source implementation of JavaScript
written entirely in Java.
Rhino JavaScript Java Library Source Code files are provided in binary package (rhino-1.7.14.zip).
You can also browse the source code below:
✍: FYIcenter.com
⏎ org/mozilla/javascript/xml/XMLLib.java
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package org.mozilla.javascript.xml; import org.mozilla.javascript.Context; import org.mozilla.javascript.Ref; import org.mozilla.javascript.ScriptRuntime; import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; public abstract class XMLLib { private static final Object XML_LIB_KEY = new Object(); /** * An object which specifies an XMLLib implementation to be used at runtime. * * This interface should be considered experimental. It may be better * (and certainly more flexible) to write an interface that returns an * XMLLib object rather than a class name, for example. But that would * cause many more ripple effects in the code, all the way back to * {@link ScriptRuntime}. */ public static abstract class Factory { public static Factory create(final String className) { return new Factory() { @Override public String getImplementationClassName() { return className; } }; } public abstract String getImplementationClassName(); } public static XMLLib extractFromScopeOrNull(Scriptable scope) { ScriptableObject so = ScriptRuntime.getLibraryScopeOrNull(scope); if (so == null) { // If library is not yet initialized, return null return null; } // Ensure lazily initialization of real XML library instance // which is done on first access to XML property ScriptableObject.getProperty(so, "XML"); return (XMLLib)so.getAssociatedValue(XML_LIB_KEY); } public static XMLLib extractFromScope(Scriptable scope) { XMLLib lib = extractFromScopeOrNull(scope); if (lib != null) { return lib; } String msg = ScriptRuntime.getMessageById("msg.XML.not.available"); throw Context.reportRuntimeError(msg); } protected final XMLLib bindToScope(Scriptable scope) { ScriptableObject so = ScriptRuntime.getLibraryScopeOrNull(scope); if (so == null) { // standard library should be initialized at this point throw new IllegalStateException(); } return (XMLLib)so.associateValue(XML_LIB_KEY, this); } public abstract boolean isXMLName(Context cx, Object name); public abstract Ref nameRef(Context cx, Object name, Scriptable scope, int memberTypeFlags); public abstract Ref nameRef(Context cx, Object namespace, Object name, Scriptable scope, int memberTypeFlags); /** * Escapes the reserved characters in a value of an attribute. * * @param value Unescaped text * @return The escaped text */ public abstract String escapeAttributeValue(Object value); /** * Escapes the reserved characters in a value of a text node. * * @param value Unescaped text * @return The escaped text */ public abstract String escapeTextValue(Object value); /** * Construct namespace for default xml statement. */ public abstract Object toDefaultXmlNamespace(Context cx, Object uriValue); public void setIgnoreComments(boolean b) { throw new UnsupportedOperationException(); } public void setIgnoreWhitespace(boolean b) { throw new UnsupportedOperationException(); } public void setIgnoreProcessingInstructions(boolean b) { throw new UnsupportedOperationException(); } public void setPrettyPrinting(boolean b) { throw new UnsupportedOperationException(); } public void setPrettyIndent(int i) { throw new UnsupportedOperationException(); } public boolean isIgnoreComments() { throw new UnsupportedOperationException(); } public boolean isIgnoreProcessingInstructions() { throw new UnsupportedOperationException(); } public boolean isIgnoreWhitespace() { throw new UnsupportedOperationException(); } public boolean isPrettyPrinting() { throw new UnsupportedOperationException(); } public int getPrettyIndent() { throw new UnsupportedOperationException(); } }
⏎ org/mozilla/javascript/xml/XMLLib.java
Or download all of them as a single archive file:
File name: rhino-1.7.14-sources.jar File size: 1029165 bytes Release date: 2022-01-06 Download
⇒ Example code to Test rhino-runtime-1.7.14.jar
⇐ Download Rhino JavaScript Binary Package
2022-05-03, ≈78🔥, 1💬
Popular Posts:
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper ut...
What Is HttpComponents httpcore-4.4.6.jar? HttpComponents httpcore-4.4.6.jar is the JAR file for Apa...
The Apache FontBox library is an open source Java tool to obtain low level information from font fil...
How to download and install JDK (Java Development Kit) 1.4? If you want to write Java applications, ...