Exemplo n.º 1
0
 protected static boolean setSupportDTD(XMLInputFactory f, boolean state)
     throws XMLStreamException {
   try {
     f.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.valueOf(state));
     return (willSupportDTD(f) == state);
   } catch (IllegalArgumentException e) {
     // Let's assume that the property (or specific value) is NOT supported...
     return false;
   }
 }
Exemplo n.º 2
0
 protected static void setRepairing(XMLOutputFactory f, boolean state) {
   f.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(state));
 }
Exemplo n.º 3
0
 protected static void setValidating(XMLInputFactory f, boolean state) throws XMLStreamException {
   f.setProperty(XMLInputFactory.IS_VALIDATING, Boolean.valueOf(state));
 }
Exemplo n.º 4
0
 protected static void setCoalescing(XMLInputFactory f, boolean state) throws XMLStreamException {
   f.setProperty(XMLInputFactory.IS_COALESCING, Boolean.valueOf(state));
 }