Tabnine Logo
XMLNode.setContent
Code IndexAdd Tabnine to your IDE (free)

How to use
setContent
method
in
net.anotheria.util.xml.XMLNode

Best Java code snippets using net.anotheria.util.xml.XMLNode.setContent (Showing top 6 results out of 315)

origin: net.anotheria/ano-doc

private XMLNode getChildNode(String name, String text){
  XMLNode ret = new XMLNode(name);
  ret.setContent(text);
  return ret;
}
origin: net.anotheria/ano-doc

/** {@inheritDoc} */
@Override public XMLNode toXMLNode(){
  XMLNode elem = super.toXMLNode();
  
  elem.setContent("");
  
  for (Property p : getList()){
    elem.addChildNode(p.toXMLNode());
  }
  
  return elem;
}

origin: net.anotheria/ano-maf

XMLNode command = new XMLNode("command");
command.addAttribute(new XMLAttribute("type", c.getValue().getClass().getSimpleName()));
command.setContent(c.getValue().toString());
m.addChildNode(command);
origin: net.anotheria/ano-doc

private static XMLNode createXMLNodeWithContent(String name, String[] languages, String type, Object... value){
  XMLNode ret = new XMLNode(name);
  
  if (languages==null){
    XMLNode val = new XMLNode("value");
    if (type!=null)
      val.addAttribute(new XMLAttribute("type", type));
    ret.addChildNode(val);
    if (value!=null)
      val.setContent(""+value[0]);
  }else{
    for (int i=0; i<languages.length; i++){
      String l = languages[i];
      XMLNode val = new XMLNode("value");
      if (type!=null)
        val.addAttribute(new XMLAttribute("type", type));
      
      val.addAttribute(new XMLAttribute("language", l));
      if (value!=null){
        Object valueToSet = value[i]!=null?value[i]:"";
        val.setContent("" + valueToSet);
      }
      ret.addChildNode(val);
      
    }
  }
  return ret;
}
origin: net.anotheria/ano-doc

/**
 * Creates an xml node for export.
 *
 * @return new XMLNode object
 */
public XMLNode toXMLNode(){
  XMLNode ret = new XMLNode("property");
  ret.addAttribute(new XMLAttribute("name", getName()));
  ret.addAttribute(new XMLAttribute("type", getPropertyType().toString()));
  ret.setContent(""+getValue());
  return ret;
}

origin: net.anotheria/ano-doc

/**
 * <p>createXMLNodeForListValue.</p>
 *
 * @param name a {@link java.lang.String} object.
 * @param contentType a {@link java.lang.String} object.
 * @param content a {@link java.util.List} object.
 * @param <T> a T object.
 * @return a {@link net.anotheria.util.xml.XMLNode} object.
 */
public static <T> XMLNode createXMLNodeForListValue(String name, String contentType, List<T> content){
  XMLNode ret = new XMLNode(name);
  
  XMLNode val = new XMLNode("value");
  ret.addChildNode(val);
  
  val.addAttribute(new XMLAttribute("type", "list"));
  val.addAttribute(new XMLAttribute("contentType", contentType));
  for(Object c:content){
    XMLNode el = new XMLNode("element");
    val.addChildNode(el);
    el.setContent(""+c);
  }
  return ret;
}

net.anotheria.util.xmlXMLNodesetContent

Javadoc

Setter for the field content.

Popular methods of XMLNode

  • <init>
    Constructor. Creates a new XMLNode.
  • addAttribute
    addAttribute.
  • addChildNode
    Allow add child node for current.
  • write
    Recursive - Write method.
  • createAttributeString
    Areates attribute string.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Kernel (java.awt.image)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JFrame (javax.swing)
  • JTable (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now