草庐IT

parse_ini_file

全部标签

xml - XML 文件中的数据 : One large file or multiple small ones?

我目前正在开发一个基于XML的CMS,它将数据保存在称为“项目”的block中。这些可以在网站上用于显示内容。现在,我现在每个项目都有一个单独的XML文件。由于该网站上的大多数页面使用大约三到四个这些项目,一个相当小的网站,例如20页有大约100个不同的项目。因此,我的/xml/items文件夹中有相同数量的xml文件。将所有数据存储在一个单独的items.xml文件中会更可取,还是我当前的方法更好?Pro单个文件-xml/items.xml更少的文件(也许开始成为谈论时的性能问题数千件元素放在更大的网站。)更少的磁盘访问(尤其是在带有所有列表的管理项)Pro多文件-xml/items

c# - 系统.Xml.XmlException : Unexpected end of file while parsing Name has occurred

我正在使用通过SqlCommand.ExecuteXmlReader检索的XmlReader。Hereismyinput当我运行这行代码时:XDocumentcurrentXDoc=XDocument.Load(ktXmlReader.ReadSubtree());它第一次工作,按预期读取第一个Product节点。第二次运行时,出现以下异常:System.Xml.XmlException:Message:UnexpectedendoffilewhileparsingNamehasoccurred.Line1,position2048.Stacktrace:atSystem.Xml.Xm

c# - SandcaSTLe Help File Builder 找不到文档源

我正在使用SandcaSTLe帮助文件生成器构建VS2010C#项目的文档。我已将编译器生成的.xml文档和项目的VisualStudio解决方案.sln文件添加到DocumentationSources。我还将项目的可执行文件.exe添加到References。但是,它不是建筑。我收到这些警告和错误:SHFB:WarningBE0006:Unabletolocateanydocumentationsourcesfor'C:\Users\user\Music\Documents\VisualStudio2010\Projects\SFML_Platformer\SFML_Platfor

xml - 获取文档为 null [#document : null] After parsing XML in java using DocumentBuilder

解析文档后我得到空值,即使文档包含数据。这是我的代码,我已将所有验证设置为false。DocumentBuilderFactorydomFactory=DocumentBuilderFactory.newInstance();domFactory.setNamespaceAware(false);//neverforgetthis!domFactory.setCoalescing(false);domFactory.setValidating(false);domFactory.setFeature("http://xml.org/sax/features/namespaces",fa

c# - .NET : How to validate XML file with DTD without DOCTYPE declaration

我有一个没有DOCTYPE声明的XML文件,我想在阅读时使用外部DTD对其进行验证。Dimx_setAsXml.XmlReaderSettings=NewXml.XmlReaderSettings()x_set.XmlResolver=Nothingx_set.CheckCharacters=Falsex_set.ProhibitDtd=Falsex=XmlTextReader.Create(sChemin,x_set)如何设置外部DTD的路径?你如何验证? 最佳答案 下面的功能我之前用过,应该很容易适应。如magnifico所述,

c# - XmlDocument 抛出 "An error occurred while parsing EntityName"

我有一个函数,我将一个字符串作为参数传递给名为filterXML的参数,其中一个属性中包含“&”。我知道XML不会识别它,它会给我一个错误。这是我的代码:publicXmlDocumentTestXMLDoc(stringfilterXml){XmlDocumentdoc=newXmlDocument();XmlNoderoot=doc.CreateElement("ResponseItems");//putthatrootintoourdocument(whichisanemptyplaceholdernow)doc.AppendChild(root);try{XmlDocument

xml - "parsing"在XML中的反义词

在XML文档中,“解析”的反义词是什么。例如:当您使用DOM解析器读取XML文件时,它被称为“解析”。当您使用DOM解析器创建XML文件时,它调用什么? 最佳答案 序列化 关于xml-"parsing"在XML中的反义词,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/898280/

xml - 加载样式表时出错 : Parsing an XSLT stylesheet failed

这是我的xml文件:HelloWorld!这是我的xsl文件:当我在firefox中运行xml文件时,它显示“加载样式表时出错:解析XSLT样式表失败。”错误。我是xml的新手,谁能告诉我错误是什么。你能告诉我找到错误的方法吗?谢谢! 最佳答案 您为XSL指定了错误的namespace:xmlns:xsl="http://www.w3.org/1999/xsl/Transform"相反,您必须使用:xmlns:xsl="http://www.w3.org/1999/XSL/Transform"请记住,XML区分大小写。

jquery - IE7 和 jquery ajax XML : permission denied on local xml file

$('.upload').change(function(){var$container=$('#container');$container.find('input:checkbox,input:text,select').val('');var$thisUpload=$(this);varpath='file:///'+$thisUpload.val().replace(/\\/g,"/");$.ajax({url:path,dataType:'xml',success:function(data){},error:function(request,status,error){if

xml - 引用的文件包含错误 (jar :file:/. ../plugins/org.jboss.tools.jst.web_3.5.0.Final-v20130717-0309-B75.jar!/catalog/web-facesconfig_2_2.xsd)

我在eclipse中创建JSF项目,文件faces-config.xml出错Referencedfilecontainserrors(jar:file:/D:/eclips/eclipsek/plugins/org.jboss.tools.jst.web_3.5.0.Final-v20130717-0309-B75.jar!/catalog/web-facesconfig_2_2.xsd).faces-config.xml当我删除以下行时,faces-config.xml中的错误指示消失了http://xmlns.jcp.org/xml/ns/javaee/web-facesconfi