Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlObject.xmlText()


            XmlOptions opt = new XmlOptions().setSaveOuter().
                setSaveAggressiveNamespaces();
            for (int i = 0; i < documentationItems.length; i++)
            {
                XmlObject doc = documentationItems[i];
                writeString(doc.xmlText(opt));
            }

            // Write application info items
            XmlObject[] appInfoItems = a.getApplicationInformation();
            writeInt(appInfoItems.length);
View Full Code Here


            XmlObject[] appInfoItems = a.getApplicationInformation();
            writeInt(appInfoItems.length);
            for (int i = 0; i < appInfoItems.length; i++)
            {
                XmlObject doc = appInfoItems[i];
                writeString(doc.xmlText(opt));
            }
        }

        SchemaAnnotation readAnnotation(SchemaContainer c)
        {
View Full Code Here

                cursor.toNextToken();
            }
        } finally {
            cursor.dispose();
        }
        throw new DeploymentException("Cannot find namespace in xmlObject: " + xmlObject.xmlText());
    }

    private ModuleBuilder getBuilderFromNamespace(String namespace) {
        ModuleBuilder builder = (ModuleBuilder) namespaceToBuilderMap.get(namespace);
        if (builder == null) {
View Full Code Here

                        nsMap.remove(cursor.getDomNode().getPrefix());
                        cursor.toNextToken();
                    }
                }

                xml = xmlObject.xmlText(new XmlOptions().setSaveOuter().setSavePrettyPrint()
                        .setSaveImplicitNamespaces(nsMap));
            }
        } catch (XmlException e) {

        } finally {
View Full Code Here

            StringWriter writer = new StringWriter();
            XmlUtils.serializePretty(object, writer);
            return writer.toString();
        } catch (Exception e) {
            e.printStackTrace();
            return object.xmlText();
        }
    }

    // ----------------------------------------------------------
    // OUTPUT MESSAGE GENERATORS
View Full Code Here

            StringWriter writer = new StringWriter();
            XmlUtils.serializePretty(object, writer);
            return writer.toString();
        } catch (Exception e) {
            log.warn("Exception during message generation", e);
            return object.xmlText();
        }
    }

    // ----------------------------------------------------------
    // UTILS
View Full Code Here

    public int doEndTag()
        throws JspException {

        if(_source instanceof XmlObject && _source != null) {
            XmlObject xmlObject = (XmlObject)_source;
            String xml = xmlObject.xmlText();

            InternalStringBuilder buf = new InternalStringBuilder();
            buf.append("<div");
            buf.append(" id=\"");
            buf.append(_divName);
View Full Code Here

                cursor.toNextToken();
            }
        } finally {
            cursor.dispose();
        }
        throw new DeploymentException("Cannot find namespace in xmlObject: " + xmlObject.xmlText());
    }

    private ModuleBuilder getBuilderFromNamespace(String namespace) {
        ModuleBuilder builder = (ModuleBuilder) namespaceToBuilderMap.get(namespace);
        if (builder == null) {
View Full Code Here

        // created upon to do the xmlText() against.
        XmlOptions options = new XmlOptions();
        options.put(XmlOptions.SAVE_PRETTY_PRINT);
        options.put(XmlOptions.SAVE_PRETTY_PRINT_INDENT, 2);
        options.put(XmlOptions.SAVE_AGGRESSIVE_NAMESPACES);
        String result = object.xmlText(options);
        return result;
    }

    Random _picker = new Random(1);
View Full Code Here

            XmlOptions opt = new XmlOptions().setSaveOuter().
                setSaveAggressiveNamespaces();
            for (int i = 0; i < documentationItems.length; i++)
            {
                XmlObject doc = documentationItems[i];
                writeString(doc.xmlText(opt));
            }

            // Write application info items
            XmlObject[] appInfoItems = a.getApplicationInformation();
            writeInt(appInfoItems.length);
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.