Examples of EntityTree


Examples of org.one.stone.soup.core.data.EntityTree

    public void XmlHelperCanParseAttributeWithGTandLTInValue()
    {
            String nonXmlData = " >some <data> in here '< ";
            String xmlData="<xml><element attribute=\""+nonXmlData+"\"></element></xml>";
           
            EntityTree doc = null;
            try{
                    doc = XmlHelper.parseElement( xmlData );
            }
            catch(XmlParseException pex)
            {
                    fail(pex.getMessage());
            }
           
            String result = doc.getChild("element").getAttribute("attribute");
           
            assertEquals("Failed to parse attribute",nonXmlData,result);           
    }
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

    public void parserReadsCDATA()
    {
            String nonXmlData = " >some \" \n line2 \n line3 [text] in here '< ";
            String xmlData="<xml><cdata><![CDATA["+nonXmlData+"]]></cdata></xml>";
           
            EntityTree doc = null;
            try{
                    doc = XmlHelper.parseElement( xmlData );
            }
            catch(XmlParseException pex)
            {
                    fail(pex.getMessage());
            }
           
            String result = doc.getChild("cdata").getValue();
           
            assertEquals("Failed to parse CDATA",nonXmlData,result);
    }
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

    public void parserWritesCDATA()
    {
            String nonXmlData = " >some \" \n line2 \n line3 [text] in here '< ";
            String xmlData="<xml><cdata><![CDATA["+nonXmlData+"]]></cdata></xml>";         

            EntityTree doc = null;
            try{
                    doc = XmlHelper.parseElement( xmlData );
            }
            catch(XmlParseException pex)
            {
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

                    "<!ENTITY global_taskdefs SYSTEM \"file:global_taskdefs.xml\">"+
                    "<!ENTITY global_targets SYSTEM \"file:global_targets.xml\">"+
                    "<!ENTITY properties SYSTEM \"file:properties.xml\">"+
                    "]><doc><data><![CDATA[text]]></data></doc>";
           
            EntityTree doc = null;
            try{
                    doc = XmlHelper.parseElement( xmlData );
            }
            catch(XmlParseException pex)
            {
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

    {
            String xmlData="<!DOCTYPE project ["+
                    "<!ENTITY global_properties TEST \"file:global_properties.xml\">"+
                    "]><doc><data><![CDATA[text]]></data></doc>";
           
            EntityTree doc = null;
            try{
                    doc = XmlHelper.parseElement( xmlData );
            }
            catch(XmlParseException pex)
            {
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

//    @Test
    public void parserReadsENTITY()
    {
            String xmlData="<!ENTITY name \"the name\"><doc><data><![CDATA[text]]></data></doc>";
           
            EntityTree doc = null;
            try{
                    doc = XmlHelper.parseElement( xmlData );
            }
            catch(XmlParseException pex)
            {
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

    @Test
    public void canParseElementAttribute()
    {
            String data="<name attrib=\"value\"/>";
           
            EntityTree result = null;
            try{
                    result = XmlHelper.parseElement( data );
            }
            catch(XmlParseException xe)
            {
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

    public void canParseElementAttributeWithSpaceAroundEquals()
    {
            String data="<name attrib = \"value\"/>";
            String expectedResult="<name attrib=\"value\"/>";
           
            EntityTree result = null;
            try{
                    result = XmlHelper.parseElement( data );
            }
            catch(XmlParseException xe)
            {
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

    public void canParseElementAttributeAfterLineBreak()
    {
            String data="<name \nattrib=\"value\"/>";
            String expectedResult="<name attrib=\"value\"/>";
           
            EntityTree result = null;
            try{
                    result = XmlHelper.parseElement( data );
            }
            catch(XmlParseException xe)
            {
View Full Code Here

Examples of org.one.stone.soup.core.data.EntityTree

   
    @Test
    public void testCanParseCDATA() {
      String data = "<data>\n<pageName><![CDATA[OpenForum/JarManager/Mailer]]></pageName></data>";
     
        EntityTree result = null;
        try{
                result = XmlHelper.parseElement( data );
                assertEquals("OpenForum/JarManager/Mailer",result.getChild("data").getChild("pageName").getValue());
        }
        catch(XmlParseException xe)
        {
                fail(xe.getMessage());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.