Package org.eolang.parser
Class Xmir
- java.lang.Object
-
- org.eolang.parser.Xmir
-
- All Implemented Interfaces:
com.jcabi.xml.XML
public final class Xmir extends Object implements com.jcabi.xml.XML
Prints XMIR to EO or PHI.This class will help you turn XMIR (XML document) into EOLANG plain text source code or PHI calculus expression. It's as simple as this:
String eo = new Xmir(xml).toEO();
String phi = new Xmir(xml).toPhi();
Here, the
xmlis aStringor an instance ofXMLfrom the jcabi-xml package.
-
-
Constructor Summary
Constructors Constructor Description Xmir(com.jcabi.xml.XML src)Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description NodedeepCopy()Nodeinner()com.jcabi.xml.XMLmerge(NamespaceContext ctx)Nodenode()Deprecated.List<com.jcabi.xml.XML>nodes(String xpath)com.jcabi.xml.XMLregisterNs(String pfx, Object uri)StringtoEO()Converts XMIR to EO.StringtoPhi()Converts XMIR to PHI.StringtoSaltyPhi()Converts XMIR to PHI without any syntax sugar.StringtoString()Collection<SAXParseException>validate(com.jcabi.xml.XML xsd)Collection<SAXParseException>validate(LSResourceResolver resolver)List<String>xpath(String xpath)
-
-
-
Method Detail
-
nodes
public List<com.jcabi.xml.XML> nodes(String xpath)
- Specified by:
nodesin interfacecom.jcabi.xml.XML
-
registerNs
public com.jcabi.xml.XML registerNs(String pfx, Object uri)
- Specified by:
registerNsin interfacecom.jcabi.xml.XML
-
merge
public com.jcabi.xml.XML merge(NamespaceContext ctx)
- Specified by:
mergein interfacecom.jcabi.xml.XML
-
node
@Deprecated public Node node()
Deprecated.- Specified by:
nodein interfacecom.jcabi.xml.XML
-
inner
public Node inner()
- Specified by:
innerin interfacecom.jcabi.xml.XML
-
deepCopy
public Node deepCopy()
- Specified by:
deepCopyin interfacecom.jcabi.xml.XML
-
validate
public Collection<SAXParseException> validate(LSResourceResolver resolver)
- Specified by:
validatein interfacecom.jcabi.xml.XML
-
validate
public Collection<SAXParseException> validate(com.jcabi.xml.XML xsd)
- Specified by:
validatein interfacecom.jcabi.xml.XML
-
-