本文整理了Java中com.helger.xml.serialize.write.XMLWriterSettings.<init>()
方法的一些代码示例,展示了XMLWriterSettings.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLWriterSettings.<init>()
方法的具体详情如下:
包路径:com.helger.xml.serialize.write.XMLWriterSettings
类名称:XMLWriterSettings
方法名:<init>
[英]Creates a default settings object with the following settings:
代码示例来源:origin: com.helger/ph-xml
@Nonnull
public XMLWriterSettings getClone ()
{
return new XMLWriterSettings (this);
}
代码示例来源:origin: com.helger/ph-xml
/**
* Constructor for W3C nodes.
*
* @param aNode
* The node to be streamed. May not be <code>null</code>.
* @param aCharset
* The charset to use. May not be <code>null</code>.
*/
public DOMInputStreamProvider (@Nonnull final Node aNode, @Nonnull final Charset aCharset)
{
this (aNode, new XMLWriterSettings ().setCharset (aCharset));
}
代码示例来源:origin: com.helger/ph-schematron
@Nonnull
public IPSWriterSettings setXMLWriterSettings (@Nonnull final IXMLWriterSettings aXMLWriterSettings)
{
ValueEnforcer.notNull (aXMLWriterSettings, "XMLWriterSettings");
m_aXMLWriterSettings = new XMLWriterSettings (aXMLWriterSettings);
return this;
}
代码示例来源:origin: com.helger/ph-schematron
@Nonnull
@ReturnsMutableCopy
public XMLWriterSettings getXMLWriterSettings ()
{
return new XMLWriterSettings (m_aXMLWriterSettings);
}
代码示例来源:origin: com.helger/ph-xml
/**
* Constructor for MicroNodes.
*
* @param aNode
* The node to be streamed. May not be <code>null</code>.
* @param aCharset
* The charset to use. May not be <code>null</code>.
*/
public MicroDOMInputStreamProvider (@Nonnull final IMicroNode aNode, @Nonnull final Charset aCharset)
{
this (aNode, new XMLWriterSettings ().setCharset (aCharset));
}
代码示例来源:origin: phax/ph-schematron
@Nonnull
@ReturnsMutableCopy
public XMLWriterSettings getXMLWriterSettings ()
{
return new XMLWriterSettings (m_aXMLWriterSettings);
}
代码示例来源:origin: phax/ph-schematron
@Nonnull
public IPSWriterSettings setXMLWriterSettings (@Nonnull final IXMLWriterSettings aXMLWriterSettings)
{
ValueEnforcer.notNull (aXMLWriterSettings, "XMLWriterSettings");
m_aXMLWriterSettings = new XMLWriterSettings (aXMLWriterSettings);
return this;
}
代码示例来源:origin: com.helger/ph-html
/**
* Set the XML writer settings to be used. By default values equivalent to
* {@link XMLWriterSettings#DEFAULT_XML_SETTINGS} are used.
*
* @param aXMLWriterSettings
* The XML writer settings to be used. May not be <code>null</code>.
* @return this
*/
@Nonnull
public HCConversionSettings setXMLWriterSettings (@Nonnull final IXMLWriterSettings aXMLWriterSettings)
{
ValueEnforcer.notNull (aXMLWriterSettings, "XMLWriterSettings");
// The objects are cached with indent and no-indent for performance reasons
m_aXMLWriterSettings = new XMLWriterSettings (aXMLWriterSettings);
return this;
}
代码示例来源:origin: com.helger/ph-xml
@Nonnull
@ReturnsMutableCopy
public static XMLWriterSettings createForHTML4 ()
{
return new XMLWriterSettings ().setSerializeVersion (EXMLSerializeVersion.HTML)
.setSerializeXMLDeclaration (EXMLSerializeXMLDeclaration.IGNORE)
.setIndentDeterminator (new XMLIndentDeterminatorHTML ())
.setBracketModeDeterminator (new XMLBracketModeDeterminatorHTML4 ())
.setSpaceOnSelfClosedElement (true)
.setPutNamespaceContextPrefixesInRoot (true);
}
代码示例来源:origin: com.helger/ph-xml
@Nonnull
@ReturnsMutableCopy
public static XMLWriterSettings createForXHTML ()
{
return new XMLWriterSettings ().setSerializeVersion (EXMLSerializeVersion.HTML)
.setSerializeXMLDeclaration (EXMLSerializeXMLDeclaration.IGNORE)
.setIndentDeterminator (new XMLIndentDeterminatorHTML ())
.setBracketModeDeterminator (new XMLBracketModeDeterminatorXML ())
.setSpaceOnSelfClosedElement (true)
.setPutNamespaceContextPrefixesInRoot (true);
}
代码示例来源:origin: com.helger/ph-xml
@Nonnull
@ReturnsMutableCopy
public static XMLWriterSettings createForHTML5 ()
{
return new XMLWriterSettings ().setSerializeVersion (EXMLSerializeVersion.HTML)
.setSerializeXMLDeclaration (EXMLSerializeXMLDeclaration.IGNORE)
.setIndentDeterminator (new XMLIndentDeterminatorHTML ())
.setBracketModeDeterminator (new XMLBracketModeDeterminatorHTML5 ())
.setSpaceOnSelfClosedElement (true)
.setPutNamespaceContextPrefixesInRoot (true);
}
代码示例来源:origin: phax/ph-schematron
});
final XMLWriterSettings aXWS = new XMLWriterSettings ();
aXWS.setNamespaceContext (aNSContext).setPutNamespaceContextPrefixesInRoot (true);
代码示例来源:origin: com.helger/ph-jaxb
/**
* @return The XML writer settings to be used based on this writer settings.
* Never <code>null</code>.
*/
@Nonnull
default IXMLWriterSettings getXMLWriterSettings ()
{
final XMLWriterSettings ret = new XMLWriterSettings ().setNamespaceContext (getNamespaceContext ())
.setIndent (isFormattedOutput () ? EXMLSerializeIndent.INDENT_AND_ALIGN
: EXMLSerializeIndent.NONE);
if (hasIndentString ())
ret.setIndentationString (getIndentString ());
if (hasCharset ())
ret.setCharset (getCharset ());
return ret.setNewLineMode (ENewLineMode.DEFAULT)
.setIncorrectCharacterHandling (EXMLIncorrectCharacterHandling.DO_NOT_WRITE_LOG_WARNING);
}
代码示例来源:origin: phax/ph-schematron
new PSWriter (new PSWriterSettings ().setXMLWriterSettings (new XMLWriterSettings ())).writeToFile (aPreprocessedSchema,
m_aDstFile);
log ("Successfully pre-processed Schematron " + m_aSrcFile + " to " + m_aDstFile);
代码示例来源:origin: com.helger/ph-xml
return new XMLWriterSettings ().setSerializeVersion (EXMLSerializeVersion.XML_10)
.setSerializeXMLDeclaration (EXMLSerializeXMLDeclaration.IGNORE)
.setSerializeDocType (EXMLSerializeDocType.IGNORE)
代码示例来源:origin: com.helger/ph-as4-servlet
AS4HttpDebug.debug ( () -> "SEND-RESPONSE [async sent] received: " +
XMLWriter.getNodeAsString (aAsyncResponse,
new XMLWriterSettings ().setIndent (EXMLSerializeIndent.NONE)));
});
内容来源于网络,如有侵权,请联系作者删除!