Package org.infoset.xml

Examples of org.infoset.xml.Element.addElement()


   {
      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      Document doc = constructor.createDocument();
      Element top = doc.createDocumentElement(AtomResource.FEED_NAME);
      top.addNamespaceBinding("app",APP_NAMESPACE);
      top.addElement(TITLE_NAME).addCharacters(title);
      top.addElement(ID_NAME).addCharacters("urn:uuid:"+id.toString());
      String dateString = toXSDDate(created);
      //top.addElement(PUBLISHED_NAME).addCharacters(dateString);
      top.addElement(UPDATED_NAME).addCharacters(dateString);
      //top.addElement(EDITED_NAME).addCharacters(dateString);
View Full Code Here


      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      Document doc = constructor.createDocument();
      Element top = doc.createDocumentElement(AtomResource.FEED_NAME);
      top.addNamespaceBinding("app",APP_NAMESPACE);
      top.addElement(TITLE_NAME).addCharacters(title);
      top.addElement(ID_NAME).addCharacters("urn:uuid:"+id.toString());
      String dateString = toXSDDate(created);
      //top.addElement(PUBLISHED_NAME).addCharacters(dateString);
      top.addElement(UPDATED_NAME).addCharacters(dateString);
      //top.addElement(EDITED_NAME).addCharacters(dateString);
      Element link = top.addElement(LINK_NAME);
View Full Code Here

      top.addNamespaceBinding("app",APP_NAMESPACE);
      top.addElement(TITLE_NAME).addCharacters(title);
      top.addElement(ID_NAME).addCharacters("urn:uuid:"+id.toString());
      String dateString = toXSDDate(created);
      //top.addElement(PUBLISHED_NAME).addCharacters(dateString);
      top.addElement(UPDATED_NAME).addCharacters(dateString);
      //top.addElement(EDITED_NAME).addCharacters(dateString);
      Element link = top.addElement(LINK_NAME);
      link.setAttributeValue("rel","self");
      link.setAttributeValue("href","");
      link = top.addElement(LINK_NAME);
View Full Code Here

      throws XMLException
   {
      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      Document doc = constructor.createDocument();
      Element top = doc.createDocumentElement(AtomResource.ENTRY_NAME);
      top.addElement(TITLE_NAME).addCharacters(title);
      top.addElement(ID_NAME).addCharacters("urn:uuid:"+id.toString());
      String dateString = toXSDDate(created);
      top.addElement(PUBLISHED_NAME).addCharacters(dateString);
      top.addElement(UPDATED_NAME).addCharacters(dateString);
      Element edited = top.addElement(EDITED_NAME);
View Full Code Here

   {
      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      Document doc = constructor.createDocument();
      Element top = doc.createDocumentElement(AtomResource.ENTRY_NAME);
      top.addElement(TITLE_NAME).addCharacters(title);
      top.addElement(ID_NAME).addCharacters("urn:uuid:"+id.toString());
      String dateString = toXSDDate(created);
      top.addElement(PUBLISHED_NAME).addCharacters(dateString);
      top.addElement(UPDATED_NAME).addCharacters(dateString);
      Element edited = top.addElement(EDITED_NAME);
      edited.addCharacters(dateString);
View Full Code Here

      Document doc = constructor.createDocument();
      Element top = doc.createDocumentElement(AtomResource.ENTRY_NAME);
      top.addElement(TITLE_NAME).addCharacters(title);
      top.addElement(ID_NAME).addCharacters("urn:uuid:"+id.toString());
      String dateString = toXSDDate(created);
      top.addElement(PUBLISHED_NAME).addCharacters(dateString);
      top.addElement(UPDATED_NAME).addCharacters(dateString);
      Element edited = top.addElement(EDITED_NAME);
      edited.addCharacters(dateString);
      edited.setPrefix("app");
      Element link = top.addElement(LINK_NAME);
View Full Code Here

      Element top = doc.createDocumentElement(AtomResource.ENTRY_NAME);
      top.addElement(TITLE_NAME).addCharacters(title);
      top.addElement(ID_NAME).addCharacters("urn:uuid:"+id.toString());
      String dateString = toXSDDate(created);
      top.addElement(PUBLISHED_NAME).addCharacters(dateString);
      top.addElement(UPDATED_NAME).addCharacters(dateString);
      Element edited = top.addElement(EDITED_NAME);
      edited.addCharacters(dateString);
      edited.setPrefix("app");
      Element link = top.addElement(LINK_NAME);
      link.setAttributeValue("rel","edit");
View Full Code Here

      Element link = top.addElement(LINK_NAME);
      link.setAttributeValue("rel","edit");
      link.setAttributeValue("href","./_/"+id);
      if (authorName!=null) {
         Element author = top.addElement(AUTHOR_NAME);
         author.addElement(NAME_NAME).addCharacters(authorName);
      }
      return doc;
   }
   public static Document createMediaEntryDocument(String title,UUID id,Date created,String authorName,String href,MediaType type)
      throws XMLException
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.