[英]AJAX XML tree without server-side language
I need to make a nodes tree from data.xml file (as here link text ) with AJAX. 我需要使用AJAX从data.xml文件(如此处的链接文本 )制作一个节点树。
Is it possible to do this without the server programming language? 如果没有服务器编程语言,是否可以这样做?
I can get the whole data.xml file (all nodes) - but I need to load nodes dynamically (depending on the current tree view). 我可以获取整个data.xml文件(所有节点)-但我需要动态加载节点(取决于当前的树形视图)。
Without any server side programming, you can only get the entire XML file (through an XmlHttpRequest) and work on it on the client side. 如果没有任何服务器端编程,则只能(通过XmlHttpRequest)获取整个XML文件并在客户端上进行处理。 If the file is not huge, this should not be a problem, though.
如果文件不是很大,那么这应该不是问题。
Once you have the file, there are ways of dealing with it and querying it for a specific node. 获得文件后,可以使用多种方法来处理该文件并查询特定节点。 How you do this specifically depends on various factors, but since your question provides no context in this regard, this is hard to tell.
具体如何执行取决于各种因素,但是由于您的问题在这方面没有提供背景信息,因此很难说清。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.