congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DomFragmentMapper
Code IndexAdd Tabnine to your IDE (free)

How to use
DomFragmentMapper
in
org.jibx.extras

Best Java code snippets using org.jibx.extras.DomFragmentMapper (Showing top 2 results out of 315)

origin: org.jibx/jibx-extras

public void marshal(Object obj, IMarshallingContext ictx)
  throws JiBXException {
  
  // make sure the parameters are as expected
  if (!(obj instanceof DocumentFragment)) {
    throw new JiBXException
      ("Mapped object not an org.w3c.dom.DocumentFragment");
  } else {
    try {
        
      // marshal document fragment with no indentation
      m_xmlWriter = ictx.getXmlWriter();
      int indent = ictx.getIndent();
      ictx.setIndent(-1);
      m_defaultNamespaceURI = null;
      marshalContent(((DocumentFragment)obj).getChildNodes());
      ictx.setIndent(indent);
      
    } catch (IOException e) {
      throw new JiBXException("Error writing to document", e);
    }
  }
}
origin: org.jibx/jibx-extras

try {
  Node node;
  while ((node = unmarshalNode()) != null) {
    frag.appendChild(node);
org.jibx.extrasDomFragmentMapper

Javadoc

Custom content list marshaller/unmarshaller to DOM representation. This allows you to mix data binding and document model representations for XML within the same application. You simply use this marshaller/unmarshaller with a linked object type of org.w3c.dom.DocumentFragment (the actual runtime type - the declared type is ignored and can be anything). When unmarshalling it will create a fragment to hold any content up to the close tag for the enclosing element in the list. When marshalling, it will simply write out any content directly.

Most used methods

  • marshalContent
  • unmarshalNode

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • JFileChooser (javax.swing)
  • Top plugins for Android Studio
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