com.helger.xml.serialize.write.XMLWriterSettings.setEmitNamespaces()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中com.helger.xml.serialize.write.XMLWriterSettings.setEmitNamespaces()方法的一些代码示例,展示了XMLWriterSettings.setEmitNamespaces()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLWriterSettings.setEmitNamespaces()方法的具体详情如下:
包路径:com.helger.xml.serialize.write.XMLWriterSettings
类名称:XMLWriterSettings
方法名:setEmitNamespaces

XMLWriterSettings.setEmitNamespaces介绍

暂无

代码示例

代码示例来源:origin: com.helger/ph-html

/**
 * @return The global read-only non-<code>null</code> conversion settings with
 *         XML namespaces disabled
 */
@Nonnull
public static HCConversionSettings getConversionSettingsWithoutNamespaces ()
{
 // Create a copy!!
 final HCConversionSettings aCS = getMutableConversionSettings ().getClone ();
 // And modify the copied XML settings
 aCS.getXMLWriterSettings ().setEmitNamespaces (false);
 return aCS;
}

代码示例来源:origin: com.helger/ph-oton-datatables

/**
 * Create the HC conversion settings to be used for HTML serialization.
 *
 * @return Never <code>null</code>.
 */
@Nonnull
public static IHCConversionSettings createConversionSettings ()
{
 // Create HTML without namespaces
 final HCConversionSettings aRealCS = HCSettings.getMutableConversionSettings ().getClone ();
 aRealCS.getMutableXMLWriterSettings ().setEmitNamespaces (false);
 // Remove any "HCCustomizerAutoFocusFirstCtrl" customizer for AJAX calls on
 // DataTables
 final IHCCustomizer aCustomizer = aRealCS.getCustomizer ();
 if (aCustomizer instanceof HCCustomizerAutoFocusFirstCtrl)
  aRealCS.setCustomizer (null);
 else
  if (aCustomizer instanceof HCCustomizerList)
   ((HCCustomizerList) aCustomizer).removeAllCustomizersOfClass (HCCustomizerAutoFocusFirstCtrl.class);
 return aRealCS;
}

代码示例来源:origin: com.helger/ph-xml

/**
 * Copy constructor.
 *
 * @param aOther
 *        The object to copy the settings from. May not be <code>null</code>.
 */
public XMLWriterSettings (@Nonnull final IXMLWriterSettings aOther)
{
 ValueEnforcer.notNull (aOther, "Other");
 setSerializeVersion (aOther.getSerializeVersion ());
 setSerializeXMLDeclaration (aOther.getSerializeXMLDeclaration ());
 setSerializeDocType (aOther.getSerializeDocType ());
 setSerializeComments (aOther.getSerializeComments ());
 setIndent (aOther.getIndent ());
 setIndentDeterminator (aOther.getIndentDeterminator ());
 setIncorrectCharacterHandling (aOther.getIncorrectCharacterHandling ());
 setCharset (aOther.getCharset ());
 setNamespaceContext (aOther.getNamespaceContext ());
 setBracketModeDeterminator (aOther.getBracketModeDeterminator ());
 setUseDoubleQuotesForAttributes (aOther.isUseDoubleQuotesForAttributes ());
 setSpaceOnSelfClosedElement (aOther.isSpaceOnSelfClosedElement ());
 setNewLineMode (aOther.getNewLineMode ());
 setIndentationString (aOther.getIndentationString ());
 setEmitNamespaces (aOther.isEmitNamespaces ());
 setPutNamespaceContextPrefixesInRoot (aOther.isPutNamespaceContextPrefixesInRoot ());
 setWriteCDATAAsText (aOther.isWriteCDATAAsText ());
 setOrderAttributesAndNamespaces (aOther.isOrderAttributesAndNamespaces ());
}

相关文章