Package org.eolang.parser
Class StrictXmir
- java.lang.Object
-
- org.eolang.parser.StrictXmir
-
- All Implemented Interfaces:
com.jcabi.xml.XML
public final class StrictXmir extends Object implements com.jcabi.xml.XML
XMIR that validates itself right after construction.Be careful with this class, because it modifies the XML encapsulated by replacing the URI of XSD schema with a file, thus making schema validation faster. The original URI of the XSD schema will be lost/removed from the XML. Thus, you better save the XML to disc and only then encapsulate it into this decorator.
- Since:
- 0.49.0
-
-
Constructor Summary
Constructors Constructor Description StrictXmir(com.jcabi.xml.XML src)
Ctor.StrictXmir(com.jcabi.xml.XML before, Path tmp)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Node
deepCopy()
Node
inner()
com.jcabi.xml.XML
merge(NamespaceContext context)
Node
node()
Deprecated.List<com.jcabi.xml.XML>
nodes(String query)
com.jcabi.xml.XML
registerNs(String prefix, Object uri)
String
toString()
Collection<SAXParseException>
validate(com.jcabi.xml.XML schema)
Collection<SAXParseException>
validate(LSResourceResolver resolver)
List<String>
xpath(String query)
-
-
-
Constructor Detail
-
StrictXmir
public StrictXmir(com.jcabi.xml.XML src)
Ctor.- Parameters:
src
- The source
-
StrictXmir
public StrictXmir(com.jcabi.xml.XML before, Path tmp)
Ctor. Synchronization by XML is necessary in case we're trying to validate the sameXML
in multiple threads. In such case the path to XSD scheme inside XML should be updated only once.- Parameters:
before
- The XML sourcetmp
- The directory with cached XSD files
-
-
Method Detail
-
nodes
public List<com.jcabi.xml.XML> nodes(String query)
- Specified by:
nodes
in interfacecom.jcabi.xml.XML
-
registerNs
public com.jcabi.xml.XML registerNs(String prefix, Object uri)
- Specified by:
registerNs
in interfacecom.jcabi.xml.XML
-
merge
public com.jcabi.xml.XML merge(NamespaceContext context)
- Specified by:
merge
in interfacecom.jcabi.xml.XML
-
node
@Deprecated public Node node()
Deprecated.- Specified by:
node
in interfacecom.jcabi.xml.XML
-
inner
public Node inner()
- Specified by:
inner
in interfacecom.jcabi.xml.XML
-
deepCopy
public Node deepCopy()
- Specified by:
deepCopy
in interfacecom.jcabi.xml.XML
-
validate
public Collection<SAXParseException> validate(LSResourceResolver resolver)
- Specified by:
validate
in interfacecom.jcabi.xml.XML
-
validate
public Collection<SAXParseException> validate(com.jcabi.xml.XML schema)
- Specified by:
validate
in interfacecom.jcabi.xml.XML
-
-