Package org.infoglue.cms.util.dom

Examples of org.infoglue.cms.util.dom.DOMBuilder.addElement()


   */
  private Document buildContentVersionDocument()
  {
    final DOMBuilder builder  = new DOMBuilder();
    final Document document   = builder.createDocument();
    final Element rootElement = builder.addElement(document, "root");
    builder.addAttribute(rootElement, "xmlns", "x-schema:Schema.xml");
    final Element attributesRoot =  builder.addElement(rootElement, "attributes");
   
    buildAttributes(builder, attributesRoot);
   
View Full Code Here


  {
    final DOMBuilder builder  = new DOMBuilder();
    final Document document   = builder.createDocument();
    final Element rootElement = builder.addElement(document, "root");
    builder.addAttribute(rootElement, "xmlns", "x-schema:Schema.xml");
    final Element attributesRoot =  builder.addElement(rootElement, "attributes");
   
    buildAttributes(builder, attributesRoot);
   
    return document;
  }
View Full Code Here

       
            attributesRoot = (Element)document.getRootElement().element("attributes");
          }
          else
          {
              rootElement = domBuilder.addElement(document, "article");
              attributesRoot = domBuilder.addElement(rootElement, "attributes");
          }
           
            logger.info("attributesRoot:" + attributesRoot);
            logger.info("XML before:" + document.asXML());
View Full Code Here

            attributesRoot = (Element)document.getRootElement().element("attributes");
          }
          else
          {
              rootElement = domBuilder.addElement(document, "article");
              attributesRoot = domBuilder.addElement(rootElement, "attributes");
          }
           
            logger.info("attributesRoot:" + attributesRoot);
            logger.info("XML before:" + document.asXML());
View Full Code Here

                {
                  logger.info("attribute:" + attribute);
                    if(attribute != null)
                      attributesRoot.remove(attribute);                 
                }
                Element attribute = domBuilder.addElement(attributesRoot, attributeName);
                
                logger.info("attribute after:" + attribute);
               
                domBuilder.addCDATAElement(attribute, attributeValue);
            }                 
View Full Code Here

            Map<String, String> attributes = (Map<String, String>)contentVersion.get("contentVersionAttributes");

            DOMBuilder domBuilder = new DOMBuilder();
            Document document = domBuilder.createDocument();

            Element rootElement = domBuilder.addElement(document, "root");
            domBuilder.addAttribute(rootElement, "xmlns", "x-schema:Schema.xml");
            Element attributesRoot = domBuilder.addElement(rootElement, "attributes");

            Iterator<String> attributesIterator = attributes.keySet().iterator();
            while(attributesIterator.hasNext())
View Full Code Here

            DOMBuilder domBuilder = new DOMBuilder();
            Document document = domBuilder.createDocument();

            Element rootElement = domBuilder.addElement(document, "root");
            domBuilder.addAttribute(rootElement, "xmlns", "x-schema:Schema.xml");
            Element attributesRoot = domBuilder.addElement(rootElement, "attributes");

            Iterator<String> attributesIterator = attributes.keySet().iterator();
            while(attributesIterator.hasNext())
            {
              String attributeName  = attributesIterator.next();
View Full Code Here

              String attributeName  = attributesIterator.next();
              String attributeValue = attributes.get(attributeName);

              attributeValue = cleanAttributeValue(attributeValue, allowHTMLContent, allowExternalLinks, allowDollarSigns, allowAnchorSigns);

              Element attribute = domBuilder.addElement(attributesRoot, attributeName);
              domBuilder.addCDATAElement(attribute, attributeValue);
            }

            contentVersionVO.setVersionValue(document.asXML());
View Full Code Here

                attributesRoot = (Element)document.getRootElement().element("attributes");
              }
              else
              {
                document = domBuilder.createDocument();
                Element rootElement = domBuilder.addElement(document, "root");
                domBuilder.addAttribute(rootElement, "xmlns", "x-schema:Schema.xml");
                attributesRoot = domBuilder.addElement(rootElement, "attributes");
              }

              if(logger.isDebugEnabled())
View Full Code Here

              else
              {
                document = domBuilder.createDocument();
                Element rootElement = domBuilder.addElement(document, "root");
                domBuilder.addAttribute(rootElement, "xmlns", "x-schema:Schema.xml");
                attributesRoot = domBuilder.addElement(rootElement, "attributes");
              }

              if(logger.isDebugEnabled())
                logger.info("attributesRoot:" + attributesRoot);
             
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.