Package org.ajax4jsf.context

Examples of org.ajax4jsf.context.SAXStartElementEvent


    if (headEvents != null && headEvents.length > 0) {
      LinkedList<Boolean> closedStack = new LinkedList<Boolean>();
     
      for (Object event : headEvents) {
        if (event instanceof SAXStartElementEvent) {
          SAXStartElementEvent startElementEvent = (SAXStartElementEvent) event;

          if (!closedStack.isEmpty() && Boolean.FALSE.equals(closedStack.peek())) {
            out.write('>');
            closedStack.set(0, Boolean.TRUE);
          }

          out.write('<');
          out.write(startElementEvent.getName());
         
          for (Map.Entry<String, String> entry : startElementEvent.getAttributes().entrySet()) {
            String name = entry.getKey();
            String value = entry.getValue();
            out.write(' ');
            out.write(name);
            out.write("='");
View Full Code Here


        LinkedList<QName> stack = new LinkedList<QName>();
        int depth = 0;

        for (Object event : headEvents) {
          if (event instanceof SAXStartElementEvent) {
            SAXStartElementEvent startElementEvent = (SAXStartElementEvent) event;

            String elementName = startElementEvent.getName();
            QName element = new QName(prefix, elementName, elementName, uri);
            stack.add(element);

            XMLAttributes attrs = new XMLAttributesImpl();
            for (Map.Entry<String, String> entry : startElementEvent.getAttributes().entrySet()) {
             
              String name = entry.getKey();
              String value = entry.getValue();
              attrs.addAttribute(new QName(prefix, name, name, uri), "CDATA", value);
            }
View Full Code Here

          LinkedList<Element> nodesStack = new LinkedList<Element>();
         
          for (Object event : headEvents) {
            if (event instanceof SAXStartElementEvent) {
              SAXStartElementEvent startElement = (SAXStartElementEvent) event;
             
              Element element = document.createElement(startElement.getName());
              for (Map.Entry<String, String> attributeEntry : startElement.getAttributes().entrySet()) {
                element.setAttribute(attributeEntry.getKey(), attributeEntry.getValue());
              }
             
              if (nodesStack.isEmpty()) {
                head.insertBefore(element, child);
View Full Code Here

TOP

Related Classes of org.ajax4jsf.context.SAXStartElementEvent

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.