Class 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 Detail

      • StrictXmir

        public StrictXmir​(com.jcabi.xml.XML src)
        Ctor.
        Parameters:
        src - The source
      • StrictXmir

        public StrictXmir​(com.jcabi.xml.XML src,
                          Path tmp)
        Ctor.
        Parameters:
        src - The source
        tmp - The directory with cached XSD files
    • Method Detail

      • xpath

        public List<String> xpath​(String query)
        Specified by:
        xpath in interface com.jcabi.xml.XML
      • nodes

        public List<com.jcabi.xml.XML> nodes​(String query)
        Specified by:
        nodes in interface com.jcabi.xml.XML
      • registerNs

        public com.jcabi.xml.XML registerNs​(String prefix,
                                            Object uri)
        Specified by:
        registerNs in interface com.jcabi.xml.XML
      • merge

        public com.jcabi.xml.XML merge​(NamespaceContext context)
        Specified by:
        merge in interface com.jcabi.xml.XML
      • node

        @Deprecated
        public Node node()
        Deprecated.
        Specified by:
        node in interface com.jcabi.xml.XML
      • inner

        public Node inner()
        Specified by:
        inner in interface com.jcabi.xml.XML
      • deepCopy

        public Node deepCopy()
        Specified by:
        deepCopy in interface com.jcabi.xml.XML
      • validate

        public Collection<SAXParseException> validate​(com.jcabi.xml.XML schema)
        Specified by:
        validate in interface com.jcabi.xml.XML