Examples of XmlDocument


Examples of br.net.woodstock.rockframework.core.xml.dom.XmlDocument

  }

  @Override
  public void read(final InputStream inputStream, final String password) throws IOException {
    try {
      XmlDocument document = XmlDocument.read(inputStream);
      XmlElement root = document.getRoot();

      String encoding = root.getAttribute(XMLStore.ENCODING_ATTRIBUTE);

      XmlElement certificates = root.getElement(XMLStore.CERTIFICATES_ELEMENT);
      XmlElement privateKeys = root.getElement(XMLStore.PRIVATE_KEYS_ELEMENT);
View Full Code Here

Examples of br.net.woodstock.rockframework.xml.dom.XmlDocument

      WebLog.getInstance().getLog().info("Class " + clazz.getCanonicalName() + " is not not a child of " + JspTag.class.getCanonicalName());
    }

    Tag tag = clazz.getAnnotation(Tag.class);

    XmlDocument document = new XmlDocument("tag");
    XmlElement root = document.getRoot();

    if (ConditionUtils.isNotEmpty(tag.description())) {
      root.addElement("description").setData(tag.description());
    }

    root.addElement("name").setData(tag.name());
    root.addElement("tag-class").setData(clazz.getCanonicalName());
    root.addElement("body-content").setData(tag.content());

    if (tag.dynamicAttributes()) {
      root.addElement("dynamic-attributes").setData(Boolean.valueOf(tag.dynamicAttributes()));
    }

    BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(clazz).getBeanDescriptor();

    for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
      if (!propertyDescriptor.isAnnotationPresent(Attribute.class)) {
        continue;
      }

      Attribute tldAttribute = propertyDescriptor.getAnnotation(Attribute.class);
      XmlElement e = root.addElement("attribute");

      if (ConditionUtils.isNotEmpty(tldAttribute.description())) {
        e.addElement("description").setData(tldAttribute.description());
      }

      e.addElement("name").setData(propertyDescriptor.getName());
      e.addElement("required").setData(Boolean.valueOf(tldAttribute.required()));
      e.addElement("rtexprvalue").setData(Boolean.valueOf(tldAttribute.rtexprvalue()));
      if ((!tldAttribute.rtexprvalue()) && (tldAttribute.type() != String.class)) {
        e.addElement("type").setData(tldAttribute.type().getCanonicalName());
      }
    }

    return document.toString();
  }
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.util.xml.XMLDocument

    // path relative to the src directory
    String relpath = f.getPath().replaceAll(this.srcDir.getAbsolutePath(), "");
   
    // Check if collXml contains information for this file
    XMLDocument repoXml = new XMLDocument(collXml);
    if (repoXml.getNode("/collection/entry[@id='" + relpath + "']") == null)
      return false;
   
    UUID uuid = UUID.randomUUID();
    File resourceXml = null;
    ImageInfo imageInfo = null;
View Full Code Here

Examples of com.anzsoft.client.utils.XmlDocument

    else
    {
      XmppQuery iq = session.getFactory().createQuery();
      iq.setIQ(service, XmppQuery.TYPE_SET, TextUtils.genUniqueId());
      Element query = iq.setQuery("jabber:iq:search");
      XmlDocument xmlDoc = XmlDocument.create("body", "foo");
      xmlDoc.loadXML("<body>"+searchstring+"</body>");
      query.appendChild(xmlDoc.documentElement().getFirstChildElement().cloneNode(true));
      session.send(iq, new XmppPacketListener()
      {
        public void onPacketReceived(XmppPacket packet)
        {
          onSearchResult(packet);
View Full Code Here

Examples of com.bleujin.framework.xml.XmlDocument

        super(rootElementName, rowElementName) ;
    }

    public Object handle(ResultSet resultSet) throws SQLException {
        StringBuffer buffer = (StringBuffer)super.handle(resultSet) ;
        return new XmlDocument(buffer);
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.javascript.host.xml.XMLDocument

     * Builds XMLDocument.
     * @param enclosingWindow the window
     * @return the document
     */
    public static XMLDocument buildXMLDocument(final WebWindow enclosingWindow) {
        final XMLDocument document = new XMLDocument(enclosingWindow);

        // the properties
        addProperty(document, "async", true, true);
        addProperty(document, "parseError", true, false);
        addProperty(document, "preserveWhiteSpace", true, true);
View Full Code Here

Examples of com.google.code.xmltool.XMLDocument

* @author Mathieu Carbou (mathieu.carbou@gmail.com)
*/
public final class AdditionalHeaderDefinitionTest {
    @Test
    public void test_load_definitions() throws Exception {
        XMLDocument def = XMLDoc.newDocument().addRoot("additionalHeaders")
                .addTag("xquery")
                .addTag("firstLine").addText("(:")
                .addTag("beforeEachLine").addText(" : ")
                .addTag("endLine").addText(" :)")
                .addTag("firstLineDetectionPattern").addText("\\(\\:")
                .addTag("lastLineDetectionPattern").addText("\\:\\)");

        System.out.println(def.toString());

        AdditionalHeaderDefinition loader = new AdditionalHeaderDefinition(def);

        assertEquals(loader.getDefinitions().size(), 1);
        assertEquals(loader.getDefinitions().get("xquery").getType(), "xquery");
View Full Code Here

Examples of com.intellij.psi.xml.XmlDocument

     *
     * @return xml document (never {@code null})
     * @throws IncorrectOperationException
     */
    private XmlDocument ensureXmlDocument() throws IncorrectOperationException {
        final XmlDocument xmlDocument = getXmlDocument();
        if (xmlDocument == null)
            throw new IncorrectOperationException(RES.get("missing.xml.document"));

        return xmlDocument;
    }
View Full Code Here

Examples of com.intellij.psi.xml.XmlDocument

     * tag path expression), {@code null} is returned. </p>
     *
     * @return the root tag, or {@code null}
     */
    private XmlTag getRootTag() {
        final XmlDocument xmlDocument = getXmlDocument();
        if (xmlDocument == null)
            return null;
        else {
            final XmlTag rootTag = xmlDocument.getRootTag();
            if (rootTag == null)
                return null;

            if (!rootTag.getName().equals(parseRootTagName()))
                return null;
View Full Code Here

Examples of com.intellij.psi.xml.XmlDocument

     * @return the root tag (existing, or newly created) - never {@code null}
     * @throws IncorrectOperationException if the root already exists, but does not satisfy the tag
     *                                     path expression
     */
    private XmlTag ensureRootTag() throws IncorrectOperationException {
        final XmlDocument xmlDocument = ensureXmlDocument();
        XmlTag rootTag = xmlDocument.getRootTag();
        if (rootTag != null) {
            final String rootTagName = rootTag.getName();
            if (!rootTagName.equals(parseRootTagName()))
                throw new IncorrectOperationException(
                        RES.get("incorrect.root.tag", rootTagName));
            else
                return rootTag;
        }

        final Project project = file.getProject();
        final PsiManager psiMgr = PsiManager.getInstance(project);
        final PsiElementFactory eltFactory = psiMgr.getElementFactory();

        final String tagExpr = "<" + parseRootTagName() + "/>";
        rootTag = eltFactory.createTagFromText(tagExpr);
        return (XmlTag) xmlDocument.add(rootTag);
    }
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.