Source
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
DOMSource |
Acts as a holder for a transformation Source tree in the
form of a Document Object Model (DOM) tree. |
SAXSource |
Acts as an holder for SAX-style Source. |
StreamSource |
Acts as an holder for a transformation Source in the form
of a stream of XML markup. |
|
An object that implements this interface contains the information
needed to act as source input (XML source or transformation instructions).
Public Method Summary
abstract
String
|
getSystemId()
Get the system identifier that was set with setSystemId.
|
abstract
void
|
|
Public Methods
public
abstract
String
getSystemId
()
Get the system identifier that was set with setSystemId.
Returns
- The system identifier that was set with setSystemId, or null
if setSystemId was not called.
public
abstract
void
setSystemId
(String systemId)
Set the system identifier for this Source.
The system identifier is optional if the source does not
get its data from a URL, but it may still be useful to provide one.
The application can use a system identifier, for example, to resolve
relative URIs and to include in error messages and warnings.
Parameters
systemId |
The system identifier as a URL string.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["The `Source` interface represents the input for XML transformations, encompassing XML data or transformation instructions."],["It offers implementations like `DOMSource`, `SAXSource`, and `StreamSource` for handling XML data in various forms, such as DOM trees, SAX streams, and XML markup streams."],["A key feature of the `Source` interface is the ability to set and retrieve a system identifier, aiding in resource resolution and error reporting."]]],["The `Source` interface provides a way to handle XML source input or transformation instructions. It defines two core actions: `getSystemId()` and `setSystemId()`. `getSystemId()` retrieves the system identifier, returning null if not set. `setSystemId()` sets a system identifier (URL string) for the `Source` which can be used for resolving relative URIs. The `Source` interface is implemented by `DOMSource`, `SAXSource`, and `StreamSource`, which handle different source formats.\n"]]