Examples of standaloneSet()


Examples of javax.xml.stream.XMLStreamReader.standaloneSet()

        XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                new StringReader("<?xml version='1.0'?><root/>"));
        assertEquals(false, reader.standaloneSet());
        reader.next();
        try {
            reader.standaloneSet();
            fail("Expected IllegalStateException");
        } catch (IllegalStateException ex) {
            // Expected
        }
        reader.close();
View Full Code Here

Examples of javax.xml.stream.XMLStreamReader.standaloneSet()

  public void testVersionEncodingStandalone() throws XMLStreamException {
    XMLStreamReader reader = new SimpleXMLStreamReader(new StringReader("<?xml?>"));
    Assert.assertNull(reader.getVersion());
    Assert.assertNull(reader.getCharacterEncodingScheme());
    Assert.assertFalse(reader.isStandalone());
    Assert.assertFalse(reader.standaloneSet());

    String input = "<?xml version=\"1.1\" encoding=\"US-ASCII\" standalone=\"yes\"?>";
    reader = new SimpleXMLStreamReader(new StringReader(input));
    Assert.assertEquals("1.1", reader.getVersion());
    Assert.assertEquals("US-ASCII", reader.getCharacterEncodingScheme());
View Full Code Here

Examples of javax.xml.stream.XMLStreamReader.standaloneSet()

    String input = "<?xml version=\"1.1\" encoding=\"US-ASCII\" standalone=\"yes\"?>";
    reader = new SimpleXMLStreamReader(new StringReader(input));
    Assert.assertEquals("1.1", reader.getVersion());
    Assert.assertEquals("US-ASCII", reader.getCharacterEncodingScheme());
    Assert.assertTrue(reader.isStandalone());
    Assert.assertTrue(reader.standaloneSet());
   
    reader.close();
  }

}
View Full Code Here

Examples of javax.xml.stream.events.StartDocument.standaloneSet()

    else if (start.getVersion() != null)
      return false;

    return encodingSet() == start.encodingSet() &&
           isStandalone() == start.isStandalone() &&
           standaloneSet() == start.standaloneSet();
  }
}
View Full Code Here

Examples of javax.xml.stream.events.StartDocument.standaloneSet()

    verify(startDocument, XMLStreamConstants.START_DOCUMENT, "<?xml version=\"1.0\"?>");
    Assert.assertEquals("UTF-8", startDocument.getCharacterEncodingScheme());
    Assert.assertFalse(startDocument.encodingSet());
    Assert.assertEquals("1.0", startDocument.getVersion());
    Assert.assertFalse(startDocument.isStandalone());
    Assert.assertFalse(startDocument.standaloneSet());
    reader.next();
    verify((EndDocument)eventAllocator.allocate(reader), XMLStreamConstants.END_DOCUMENT, "");

    reader = createXmlStreamReader("<? xml version=\"1.1\" ?>");
    startDocument = (StartDocument)eventAllocator.allocate(reader);
View Full Code Here

Examples of javax.xml.stream.events.StartDocument.standaloneSet()

    else if (start.getVersion() != null)
      return false;

    return encodingSet() == start.encodingSet() &&
           isStandalone() == start.isStandalone() &&
           standaloneSet() == start.standaloneSet();
  }
}
View Full Code Here

Examples of javax.xml.stream.events.StartDocument.standaloneSet()

        StartDocument other = (StartDocument) o;

        return (encodingSet() == other.encodingSet())
            && (isStandalone() == other.isStandalone())
            && (standaloneSet() == other.standaloneSet())
            && stringsWithNullsEqual(getCharacterEncodingScheme(), other.getCharacterEncodingScheme())
            && stringsWithNullsEqual(getSystemId(), other.getSystemId())
            && stringsWithNullsEqual(getVersion(), other.getVersion())
            ;
    }
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamReader2.standaloneSet()

                System.out.println();
            } else if (type == START_DOCUMENT) { // only for multi-doc mode
                System.out.print("XML-DECL: version = '"+sr.getVersion()
                                 +"', xml-decl-encoding = '"+sr.getCharacterEncodingScheme()
                                 +"', app-encoding = '"+sr.getEncoding()
                                 +"', stand-alone set: "+sr.standaloneSet());
            }
        }
        return total;
    }
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamReader2.standaloneSet()

                System.out.println();
            } else if (type == START_DOCUMENT) { // only for multi-doc mode
                System.out.print("XML-DECL: version = '"+sr.getVersion()
                                 +"', xml-decl-encoding = '"+sr.getCharacterEncodingScheme()
                                 +"', app-encoding = '"+sr.getEncoding()
                                 +"', stand-alone set: "+sr.standaloneSet());
            }
        }
        return total;
    }
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamReader2.standaloneSet()

                System.out.println(" ["+nsCount+" ns unbound]");
            } else if (type == START_DOCUMENT) { // only for multi-doc mode
                System.out.print("XML-DECL: version = '"+sr.getVersion()
                                 +"', xml-decl-encoding = '"+sr.getCharacterEncodingScheme()
                                 +"', app-encoding = '"+sr.getEncoding()
                                 +"', stand-alone set: "+sr.standaloneSet());
            }
        }
        return total;
    }
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.