Examples of writeEmptyElement()


Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

                // Get user
                User user = directory.get(username);

                // Write user
                xml.writeEmptyElement("user");
                xml.writeAttribute("name", user.getUsername());

            }

            // End document
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

                    // Get permission
                    SystemPermission sp = (SystemPermission) permission;

                    // Write permission
                    xml.writeEmptyElement("system");
                    xml.writeAttribute("type", toString(sp.getType()));

                }

                // Config permission
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

                    // Get permission
                    ConnectionPermission cp =
                            (ConnectionPermission) permission;

                    // Write permission
                    xml.writeEmptyElement("connection");
                    xml.writeAttribute("type", toString(cp.getType()));
                    xml.writeAttribute("name", cp.getObjectIdentifier());

                }
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

                    // Get permission
                    ConnectionGroupPermission cgp =
                            (ConnectionGroupPermission) permission;

                    // Write permission
                    xml.writeEmptyElement("connection-group");
                    xml.writeAttribute("type", toString(cgp.getType()));
                    xml.writeAttribute("name", cgp.getObjectIdentifier());

                }
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

                    // Get permission
                    UserPermission up = (UserPermission) permission;

                    // Write permission
                    xml.writeEmptyElement("user");
                    xml.writeAttribute("type", toString(up.getType()));
                    xml.writeAttribute("name", up.getObjectIdentifier());

                }
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

         sw.writeStartDocument("UTF-8", "1.0");
         sw.writeStartElement("D", "propfind", "DAV:");
         sw.writeNamespace("D", "DAV:");
         sw.writeStartElement("D", "prop", "DAV:");
         for (String prop : props)
            sw.writeEmptyElement("D", prop, "DAV:");

         sw.writeEndElement(); // prop
         sw.writeEndElement(); // propfind
         sw.writeEndDocument();
         out.close();
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

         {
            sw.writeStartElement("D", "remove", "DAV:");
            for (String value : propsRemove)
            {
               sw.writeStartElement("D", "prop", "DAV:");
               sw.writeEmptyElement(value);
               sw.writeEndElement(); // prop
            }
            sw.writeEndElement(); // remove
         }
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

         sw.writeStartDocument("UTF-8", "1.0");
         sw.writeStartElement("D", "lockinfo", "DAV:");
         sw.writeNamespace("D", "DAV:");
         sw.writeStartElement("D", "lockscope", "DAV:");
         if (isExclusive)
            sw.writeEmptyElement("D", "exclusive", "DAV:");
         else
            sw.writeEmptyElement("D", "shared", "DAV:");
         sw.writeEndElement(); // lockscope
         sw.writeStartElement("D", "locktype", "DAV:");
         sw.writeEmptyElement("D", "write", "DAV:");
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

         sw.writeNamespace("D", "DAV:");
         sw.writeStartElement("D", "lockscope", "DAV:");
         if (isExclusive)
            sw.writeEmptyElement("D", "exclusive", "DAV:");
         else
            sw.writeEmptyElement("D", "shared", "DAV:");
         sw.writeEndElement(); // lockscope
         sw.writeStartElement("D", "locktype", "DAV:");
         sw.writeEmptyElement("D", "write", "DAV:");
         sw.writeEndElement(); // locktype
         sw.writeStartElement("D", "owner", "DAV:");
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEmptyElement()

            sw.writeEmptyElement("D", "exclusive", "DAV:");
         else
            sw.writeEmptyElement("D", "shared", "DAV:");
         sw.writeEndElement(); // lockscope
         sw.writeStartElement("D", "locktype", "DAV:");
         sw.writeEmptyElement("D", "write", "DAV:");
         sw.writeEndElement(); // locktype
         sw.writeStartElement("D", "owner", "DAV:");
         sw.writeStartElement("D", "href", "DAV:");
         sw.writeCharacters("http://exoplatform.org");
         sw.writeEndElement(); // href
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.