使用javascript从隐藏字段中读取xml

使用javascript从隐藏字段中读取xml

问题描述:

我想阅读使用javascript

I want to read xml which is stored in hidden field using javascript

存储在隐藏字段中的xml,您可以使用DOM加载XML(参见这里)。


PS:问题应该去在答案部分而非见解
you can use the DOM to load the XML (see here).

PS: questions should go in the answers section not in insights


我尝试使用DOM,但问题是我无法从隐藏字段中读取xml。我想使用这个功能,因为我将使用来自codebehind&的ds.GetXml()来获取xml。我存储在隐藏的字段中,以便我可以使用JavaScript访问。这我想用于列表框操作目的。提前谢谢
I tried with DOM but the problem is I am not able to read the xml from hidden field. I want to use this functionality because I will get xml using ds.GetXml() from codebehind & i store in hidden field so that i can access using javascript. This i want to use for listbox manipulation purposes. Thanks in advance


从服务器读取XML文件可能更容易。
It''s probably easier to read the XML file from the server.