没有内容的网站应该怎么做,建湖人才网招工,注册网站是什么意思,微慕wordpress插件XmlReaderSettings.IgnoreWhitespace 属性
如果忽略空白#xff0c;则为 true#xff1b;否则为 false。 默认值为 false。
示例
下面创建一个设置对象#xff0c;该对象可用于构造一个读取器#xff0c;该读取器去除处理指令、注释和微不足道的空白。 StreamReader tex…XmlReaderSettings.IgnoreWhitespace 属性
如果忽略空白则为 true否则为 false。 默认值为 false。
示例
下面创建一个设置对象该对象可用于构造一个读取器该读取器去除处理指令、注释和微不足道的空白。 StreamReader textreader new StreamReader(filterXML);XmlReader reader default(XmlReader);reader XmlReader.Create(textreader, new XmlReaderSettings{CloseInput true,ConformanceLevel ConformanceLevel.Document,DtdProcessing DtdProcessing.Ignore,IgnoreComments true,IgnoreProcessingInstructions false,IgnoreWhitespace true,ValidationType ValidationType.None});注解
不被视为重要的空格包括空格、制表符和空白行用于设置标记以便提高可读性。 其中一个示例是元素内容中的空白。 此属性设置不会影响混合内容模式下标记之间的空白也不会影响在属性范围内 xml:space‘preserve’ 发生的空白。
idPkg:Story xmlns:idPkghttp://ns.adobe.com/AdobeInDesign/idml/1.0/packaging DOMVersion17.0Story Selfu236 AppliedTOCStylen UserTexttrue IsEndnoteStoryfalse TrackChangesfalse StoryTitle$ID/ AppliedNamedGridnStoryPreference OpticalMarginAlignmentfalse OpticalMarginSize12 FrameTypeTextFrameType StoryOrientationHorizontal StoryDirectionLeftToRightDirection /InCopyExportOption IncludeGraphicProxiestrue IncludeAllResourcesfalse /ParagraphStyleRange AppliedParagraphStyleParagraphStyle/10 Notes TextCharacterStyleRange AppliedCharacterStyleCharacterStyle/$ID/[No character style]PropertiesLeading typeunit13.5/LeadingAppliedFont typeobjectCompositeFont/~MHeHK-BTimLTS-B/AppliedFont/PropertiesContent /Content/CharacterStyleRange/ParagraphStyleRange/Story
/idPkg:Story?xml version1.0 encodingutf-8?
xsl:stylesheet version1.0 xmlns:xslhttp://www.w3.org/1999/XSL/Transform xmlns:msxslurn:schemas-microsoft-com:xslt
exclude-result-prefixesmsxsl xmlns:spacehttp://ns.adobe.com/AdobeInDesign/idml/1.0/packagingxsl:output methodxml indentyes/!-- This is an identity template - it copies everythingthat doesnt match another template --xsl:template match* | node()xsl:copyxsl:apply-templates select* | node()//xsl:copy/xsl:template!-- This is the other template. It says to use your BBB-DDD elementsinstead of the AAA element --xsl:template matchContent[text() ]xsl:element nameContentxsl:attribute namexml:spacepreserve/xsl:attributexsl:value-of select./xsl:value-of/xsl:element/xsl:template
/xsl:stylesheet将上面的xml通过xsl转化成带有xml:space‘preserve’ 的空值元素,新的xml
Content xml:spacepreserve /Contentprivate string TransformXml(string xmlPath)
{string transformedXmlPath System.IO.Path.GetTempFileName();XslCompiledTransform xslt new XslCompiledTransform();string xsltFilePath Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filterSpaceXslt.xslt);xslt.Load(xsltFilePath);xslt.Transform(xmlPath, transformedXmlPath);return transformedXmlPath;
}