
ee.sk.digidoc.c14n.TinyXMLParser_CData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdigidoc Show documentation
Show all versions of jdigidoc Show documentation
A Java libray for manipulating Estonian digital signature container files DDOC and BDOC. Note that this library is deprecated. It is recommended to use the new DigiDoc4j library at https://github.com/open-eid/digidoc4j
package ee.sk.digidoc.c14n;
import ee.sk.digidoc.c14n.FragmentBase;
import ee.sk.digidoc.c14n.TinyXMLParser_Fragment;
import ee.sk.digidoc.c14n.common.StringImplementation;
public final class TinyXMLParser_CData
{
public TinyXMLParser_Fragment Begin;
public TinyXMLParser_Fragment End;
public TinyXMLParser_CData()
{
}
public boolean get_IsValid()
{
if ((this.Begin == null))
{
return false;
}
if ((this.End == null))
{
return false;
}
if (!this.Begin.get_Item(""))
{
return false;
}
if ((this.Begin.get_Next() == null))
{
return false;
}
if (!this.Begin.get_Next().get_IsLiteral())
{
return false;
}
if (!this.Begin.get_Next().get_DataString().equals("CDATA"))
{
return false;
}
if ((this.Begin.get_Next().get_Next() == null))
{
return false;
}
if (!this.Begin.get_Next().get_Next().get_Item("["))
{
return false;
}
return true;
}
public String get_DataString()
{
return FragmentBase.GetDataBetweenFragments(this.Begin.get_Next().get_Next(), this.End);
}
public static TinyXMLParser_CData Of(TinyXMLParser_Fragment f)
{
TinyXMLParser_CData n;
boolean seek;
n = new TinyXMLParser_CData();
n.Begin = f;
n.End = f.get_Next();
seek = true;
if (!(n.End == null))
{
if (f.get_Item(""))
{
seek = false;
}
else
{
if ((n.End.get_Next() == null))
{
seek = false;
}
else
{
n.End = n.End.get_Next();
}
}
}
if (!n.get_IsValid())
{
n = null;
}
}
else
{
n = null;
}
}
return n;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy