Package org.dom4j

Examples of org.dom4j.Element.elementIterator()


  private TemplateEntity readThemeImportXML(final String xml)
      throws DocumentException {
    Document doc = DocumentHelper.parseText(xml);
    Element root = doc.getRootElement();
    TemplateEntity template = new TemplateEntity();
    for (Iterator<Element> i = root.elementIterator(); i.hasNext();) {
      Element element = i.next();
      if (element.getName().equals("title")) {
        template.setTitle(element.getStringValue());
      }
      if (element.getName().equals("url")) {
View Full Code Here


 
  public void readSiteContent(final ZipEntry entry, final String xml)
      throws DocumentException, DaoTaskException {
    Document doc = DocumentHelper.parseText(xml);
    Element root = doc.getRootElement();
    for (Iterator<Element> i = root.elementIterator(); i.hasNext();) {
      Element element = i.next();
      if (element.getName().equals("config")) {
        getConfigExporter().readConfigs(element);
      }
      if (element.getName().equals("pages")) {
View Full Code Here

      document = reader.read(is);
    } catch (DocumentException e) {
      e.printStackTrace();
    }
    Element rootElement = document.getRootElement();
    Iterator<Element> configElementsIter = rootElement.elementIterator();
    while (configElementsIter.hasNext()) {
      configService.register(produceElement(configElementsIter.next()));
    }

  }
View Full Code Here

               
                us.setAdresses(adr);
               
                HashSet<Organisation_Users> orgUsers = new HashSet<Organisation_Users>();
               
                for (Iterator<Element> organisationsIterator = itemUsers.elementIterator( "organisations" ); organisationsIterator.hasNext(); ) {
                 
                  Element organisations = organisationsIterator.next();
                 
                  for (Iterator<Element> organisationIterator = organisations.elementIterator( "user_organisation" ); organisationIterator.hasNext(); ) {
                     
View Full Code Here

               
                for (Iterator<Element> organisationsIterator = itemUsers.elementIterator( "organisations" ); organisationsIterator.hasNext(); ) {
                 
                  Element organisations = organisationsIterator.next();
                 
                  for (Iterator<Element> organisationIterator = organisations.elementIterator( "user_organisation" ); organisationIterator.hasNext(); ) {
                     
                    Element organisationObject = organisationIterator.next();
                   
                    Long organisation_id = importLongType(unformatString(organisationObject.element("organisation_id").getText()));
                    Long user_id = importLongType(unformatString(organisationObject.element("user_id").getText()));
View Full Code Here

      SAXReader reader = new SAXReader();
      Document document = reader.read(flvRecordingsListFile);
     
      Element root = document.getRootElement();
     
      for (Iterator<Element> i = root.elementIterator(); i.hasNext(); ) {
       
            Element itemObject =  i.next();
           
            if (itemObject.getName().equals("flvrecordings")) {
             
View Full Code Here

       
            Element itemObject =  i.next();
           
            if (itemObject.getName().equals("flvrecordings")) {
             
              for (Iterator<Element> innerIter = itemObject.elementIterator( "flvrecording" ); innerIter.hasNext(); ) {
               
                Element flvObject = innerIter.next();
               
                String alternateDownload = unformatString(flvObject.element("alternateDownload").getText());
                String comment = unformatString(flvObject.element("comment").getText());
View Full Code Here

                flvRecording.setFlvRecordingMetaData(new LinkedList<FlvRecordingMetaData>());
               
               
                Element flvrecordingmetadatas = flvObject.element("flvrecordingmetadatas");
               
                for (Iterator<Element> innerIterMetas = flvrecordingmetadatas.elementIterator( "flvrecordingmetadata" ); innerIterMetas.hasNext(); ) {
                 
                  Element flvrecordingmetadataObj = innerIterMetas.next();
                 
                  String freeTextUserName = unformatString(flvrecordingmetadataObj.element("freeTextUserName").getText());
                  String fullWavAudioData = unformatString(flvrecordingmetadataObj.element("fullWavAudioData").getText());
View Full Code Here

      SAXReader reader = new SAXReader();
      Document document = reader.read(privateMessageFoldersFile);
     
      Element root = document.getRootElement();
     
      for (Iterator<Element> i = root.elementIterator(); i.hasNext(); ) {
            Element itemObject =  i.next();
            if (itemObject.getName().equals("privatemessagefolders")) {
             
              for (Iterator<Element> innerIter = itemObject.elementIterator( "privatemessagefolder" ); innerIter.hasNext(); ) {
               
View Full Code Here

     
      for (Iterator<Element> i = root.elementIterator(); i.hasNext(); ) {
            Element itemObject =  i.next();
            if (itemObject.getName().equals("privatemessagefolders")) {
             
              for (Iterator<Element> innerIter = itemObject.elementIterator( "privatemessagefolder" ); innerIter.hasNext(); ) {
               
                Element pmfObject = innerIter.next();
               
                String folderName = unformatString(pmfObject.element("folderName").getText());
                Long userId = getNewId(importLongType(unformatString(pmfObject.element("userId").getText())), Maps.USERS);
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.