Package org.dom4j

Examples of org.dom4j.Namespace


            boolean debounce = true;
            int timeout = RhinoExpressionEngine.DEFAULT_SCRIPTTIMEOUT;
            try {
               
                Document actionDOM = DocumentHelper.parseText(actionXML);
                Element actionElement = actionDOM.getRootElement().element(new QName("action", new Namespace("tml", "urn:webtml")));
                master = WGUtils.stringToBoolean(actionElement.attributeValue("master", "false"));
                async = WGUtils.stringToBoolean(actionElement.attributeValue("async", "false"));
                debounce = WGUtils.stringToBoolean(actionElement.attributeValue("debounce", "true"));
                try {
                    timeout = Integer.parseInt(actionElement.attributeValue("timeout", new Integer(RhinoExpressionEngine.DEFAULT_SCRIPTTIMEOUT).toString()));
View Full Code Here


            if ( generateSoapResp )
            {
                respWriter.write( "<Envelope " );
               
                Namespace soapNs = new Namespace( null, "http://www.w3.org/2001/12/soap-envelope" );
                soapNs.write( respWriter );

                respWriter.write( "><Body>" );
            }
           
            respWriter.write( "<batchResponse " );
View Full Code Here

                Object value = control.getControlValue();
                if ( value != null )
                {
                    if ( ParserUtils.needsBase64Encoding( value ) )
                    {
                        Namespace xsdNamespace = new Namespace( ParserUtils.XSD, ParserUtils.XML_SCHEMA_URI );
                        Namespace xsiNamespace = new Namespace( ParserUtils.XSI, ParserUtils.XML_SCHEMA_INSTANCE_URI );
                        element.getDocument().getRootElement().add( xsdNamespace );
                        element.getDocument().getRootElement().add( xsiNamespace );

                        Element valueElement = controlElement.addElement( "controlValue" ).addText(
                            ParserUtils.base64Encode( value ) );
View Full Code Here

                {
                    Object value = ne2.nextElement();

                    if ( ParserUtils.needsBase64Encoding( value ) )
                    {
                        Namespace xsdNamespace = new Namespace( ParserUtils.XSD, ParserUtils.XML_SCHEMA_URI );
                        Namespace xsiNamespace = new Namespace( ParserUtils.XSI, ParserUtils.XML_SCHEMA_INSTANCE_URI );
                        attributeElement.getDocument().getRootElement().add( xsdNamespace );
                        attributeElement.getDocument().getRootElement().add( xsiNamespace );

                        Element valueElement = attributeElement.addElement( "value" ).addText(
                            ParserUtils.base64Encode( value ) );
View Full Code Here

        {
            element.addElement( "requestName" ).setText( request.getRequestName() );
        }
       
        // Request Value       
        Namespace xsdNamespace = new Namespace( "xsd", ParserUtils.XML_SCHEMA_URI );
        Namespace xsiNamespace = new Namespace( "xsi", ParserUtils.XML_SCHEMA_INSTANCE_URI );
        element.getDocument().getRootElement().add( xsdNamespace );
        element.getDocument().getRootElement().add( xsiNamespace );

        Element valueElement = element.addElement( "requestValue" ).addText(
            ParserUtils.base64Encode( request.getRequestValue() ) );
View Full Code Here

        Object response = extendedResponse.getResponse();
        if ( response != null )
        {
            if ( ParserUtils.needsBase64Encoding( response ) )
            {
                Namespace xsdNamespace = new Namespace( ParserUtils.XSD, ParserUtils.XML_SCHEMA_URI );
                Namespace xsiNamespace = new Namespace( ParserUtils.XSI, ParserUtils.XML_SCHEMA_INSTANCE_URI );
                element.getDocument().getRootElement().add( xsdNamespace );
                element.getDocument().getRootElement().add( xsiNamespace );
               
                Element responseElement = element.addElement( "response").addText( ParserUtils.base64Encode( response ) );
                responseElement.addAttribute( new QName("type", xsiNamespace), ParserUtils.XSD + ":" + ParserUtils.BASE64BINARY );
View Full Code Here

                    {
                        Object value = ne2.nextElement();
   
                        if ( ParserUtils.needsBase64Encoding( value ) )
                        {
                            Namespace xsdNamespace = new Namespace( "xsd", ParserUtils.XML_SCHEMA_URI );
                            Namespace xsiNamespace = new Namespace( "xsi", ParserUtils.XML_SCHEMA_INSTANCE_URI );
                            attributeElement.getDocument().getRootElement().add( xsdNamespace );
                            attributeElement.getDocument().getRootElement().add( xsiNamespace );
   
                            Element valueElement = attributeElement.addElement( "value" ).addText(
                                ParserUtils.base64Encode( value ) );
View Full Code Here

                Object value = assertion.getAssertionValue();
                if ( value != null )
                {
                    if ( ParserUtils.needsBase64Encoding( value ) )
                    {
                        Namespace xsdNamespace = new Namespace( "xsd", ParserUtils.XML_SCHEMA_URI );
                        Namespace xsiNamespace = new Namespace( "xsi", ParserUtils.XML_SCHEMA_INSTANCE_URI );
                        element.getDocument().getRootElement().add( xsdNamespace );
                        element.getDocument().getRootElement().add( xsiNamespace );

                        Element valueElement =
                            newElement.addElement( "value" ).addTextParserUtils.base64Encode( value ) );
                        valueElement
                            .addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
                    }
                    else
                    {
                        newElement.addElement( "value" ).setText( (Stringvalue );
                    }
                }
            }
        }
       
        // PRESENT FILTER
        else if ( filter instanceof PresentFilter )
        {
            Element newElement = element.addElement( "present" );
           
            newElement.addAttribute( "name", ( ( PresentFilter ) filter ).getAttributeDescription() );
        }
       
        // EXTENSIBLEMATCH
        else if ( filter instanceof ExtensibleMatchFilter )
        {
            Element newElement = element.addElement( "extensibleMatch" );
           
            ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
           
            Object value = extensibleMatchFilter.getMatchValue();
            if ( value != null )
            {
                if ( ParserUtils.needsBase64Encoding( value ) )
                {
                    Namespace xsdNamespace = new Namespace( "xsd", ParserUtils.XML_SCHEMA_URI );
                    Namespace xsiNamespace = new Namespace( "xsi", ParserUtils.XML_SCHEMA_INSTANCE_URI );
                    element.getDocument().getRootElement().add( xsdNamespace );
                    element.getDocument().getRootElement().add( xsiNamespace );

                    Element valueElement =
                        newElement.addElement( "value" ).addTextParserUtils.base64Encode( value ) );
View Full Code Here

                       
                        if ( value != null )
                        {
                            if ( ParserUtils.needsBase64Encoding( value ) )
                            {
                                Namespace xsdNamespace = new Namespace( "xsd", ParserUtils.XML_SCHEMA_URI );
                                Namespace xsiNamespace = new Namespace( "xsi", ParserUtils.XML_SCHEMA_INSTANCE_URI );
                                element.getDocument().getRootElement().add( xsdNamespace );
                                element.getDocument().getRootElement().add( xsiNamespace );

                                Element valueElement = modElement.addElement( "value" ).addText( ParserUtils.base64Encode( value ) );
                                valueElement
View Full Code Here

        .createPart(
            corePartName,
            "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");

    Document doc = DocumentHelper.createDocument();
    Namespace nsWordprocessinML = new Namespace("w",
        "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
    Element elDocument = doc.addElement(new QName("document",
        nsWordprocessinML));
    Element elBody = elDocument.addElement(new QName("body",
        nsWordprocessinML));
View Full Code Here

TOP

Related Classes of org.dom4j.Namespace

Copyright © 2018 www.massapicom. 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.