dxf = (CTDxf) obj; } else { dxf = CTDxf.Factory.parse(obj.newXMLStreamReader(), new XmlOptions().setDocumentType(CTDxf.type));
XmlOptions opts = new XmlOptions().setDocumentType(XmlBeans.typeForClass(_xbeanClass)); _impl = XmlBeans.getContextTypeLoader().parse(xmlText, null, opts);
private XmlObject ensureStore() { if ((_flags & FLAG_STORE) != 0) return this; check_dated(); String value = (_flags & FLAG_NIL) != 0 ? "" : compute_text( has_store() ? get_store() : null ); XmlOptions options = new XmlOptions().setDocumentType(schemaType()); XmlObject x = XmlObject.Factory.newInstance( options ); XmlCursor c = x.newCursor(); c.toNextToken(); c.insertChars( value ); return x; }
private com.terracottatech.config.TcConfigDocument convert(InputStream in, XmlOptions xmlOptions) throws IOException, XmlException { byte[] data = new byte[in.available()]; in.read(data); in.close(); ByteArrayInputStream ain = new ByteArrayInputStream(data); SchemaType type = com.terracottatech.config.TcConfigDocument.type; if (xmlOptions == null) xmlOptions = new XmlOptions(); xmlOptions.setDocumentType(type); return com.terracottatech.config.TcConfigDocument.Factory.parse(ain, xmlOptions); }
private com.terracottatech.config.TcConfigDocument convert(InputStream in, XmlOptions xmlOptions) throws IOException, XmlException { byte[] data = new byte[in.available()]; in.read(data); in.close(); ByteArrayInputStream ain = new ByteArrayInputStream(data); SchemaType type = com.terracottatech.config.TcConfigDocument.type; if (xmlOptions == null) xmlOptions = new XmlOptions(); xmlOptions.setDocumentType(type); return com.terracottatech.config.TcConfigDocument.Factory.parse(ain, xmlOptions); }
private com.terracottatech.config.TcConfigDocument convert(InputStream in, XmlOptions xmlOptions) throws IOException, XmlException { byte[] data = new byte[in.available()]; in.read(data); in.close(); ByteArrayInputStream ain = new ByteArrayInputStream(data); SchemaType type = com.terracottatech.config.TcConfigDocument.type; if (xmlOptions == null) xmlOptions = new XmlOptions(); xmlOptions.setDocumentType(type); return com.terracottatech.config.TcConfigDocument.Factory.parse(ain, xmlOptions); }
public void fromXml(String xml) throws XmlException { XmlOptions xmlOptions = super.getXmlLoadOptions(); xmlOptions.setDocumentType(ActionRequestDocument.type); setXmlBean(ActionRequestDocument.Factory.parse(xml, xmlOptions)); }
private void validateDD(XmlObject dd) throws XmlException { XmlOptions xmlOptions = new XmlOptions(); xmlOptions.setDocumentType(DirDirectoryConfigurationDocument.type); xmlOptions.setLoadLineNumbers(); xmlOptions.setUseDefaultNamespace(); Collection errors = new ArrayList(); xmlOptions.setErrorListener(errors); if (!dd.validate(xmlOptions)) { throw new XmlException("Invalid directory descriptor: " + errors + "\nDescriptor: " + dd.toString(), null, errors); } // System.out.println("descriptor: " + dd.toString()); } }
ns.put("", NAMESPACE); options.setLoadSubstituteNamespaces(ns); options.setDocumentType(TestResultsDocument.TestResults.type);
XmlOptions opts = new XmlOptions().setDocumentType(XmlBeans.typeForClass(_xbeanClass)); _impl = XmlBeans.getContextTypeLoader().parse(xmlText, null, opts);
XmlOptions opts = new XmlOptions().setDocumentType(XmlBeans.typeForClass(_xbeanClass)); _impl = XmlBeans.getContextTypeLoader().parse(xmlText, null, opts);
dxf = (CTDxf) obj; } else { dxf = CTDxf.Factory.parse(obj.newXMLStreamReader(), new XmlOptions().setDocumentType(CTDxf.type));
private XmlObject ensureStore() { if ((_flags & FLAG_STORE) != 0) return this; check_dated(); String value = (_flags & FLAG_NIL) != 0 ? "" : compute_text( has_store() ? get_store() : null ); XmlOptions options = new XmlOptions().setDocumentType(schemaType()); XmlObject x = XmlObject.Factory.newInstance( options ); XmlCursor c = x.newCursor(); c.toNextToken(); c.insertChars( value ); return x; }
private XmlObject ensureStore() { if ((_flags & FLAG_STORE) != 0) return this; check_dated(); String value = (_flags & FLAG_NIL) != 0 ? "" : compute_text( has_store() ? get_store() : null ); XmlOptions options = new XmlOptions().setDocumentType(schemaType()); XmlObject x = XmlObject.Factory.newInstance( options ); XmlCursor c = x.newCursor(); c.toNextToken(); c.insertChars( value ); return x; }
public XmlBeansType(SchemaType schemaType) { this.schemaType = schemaType; setTypeClass(schemaType.getJavaClass()); options.setDocumentType(schemaType); // Check to see if this is a <complexType> or global <element> if (schemaType.getContentModel() != null && schemaType.getContentModel().getParticleType() == SchemaParticle.ELEMENT) setAbstract(false); else setAbstract(true); if (!schemaType.isDocumentType() || isAbstract()) { setWriteOuter(true); } else { setWriteOuter(false); } }