xmldom

Error thrown with Microsoft.XMLDOM XML Parser in Edge with XML string content

痞子三分冷 提交于 2019-12-02 08:07:30
I'm getting the following error with the Microsoft.XMLDOM XML parser in Microsoft EDGE: Script(1,1) Sometimes it says start tag does not match end tag . And other times it gives another error. I wish I could provide the actual error messages but I'm away from a Windows machine and this is what I remember from memory. The exact same XML content works in Firefox and other browsers. Can anyone see what is going on? This could be an easy fix but again I don't have a Windows computer. Here is my XML: <s:RichText x="118" visible="true" y="238" text="Text" fontSize="58.73271028037384"> <s:filters>

No more xercesxmldom unit in Delphi XE?

一世执手 提交于 2019-12-01 17:08:28
I'm wondering what happened to the xercesxmldom unit as one of the XML DOM implementations . It seems to have disappeared in Delphi XE . Why? (I searched the docs; couldn't find any relevant info on xercesxmldom disappearing). Edit : these are the sources I have archived: R:\>dir /s /b xercesxmldom.pas R:\D2006-Enterprise-D10-BDS-4.0\source\Win32\xml\xercesxmldom.pas R:\D2007-Enterprise-D11-RadStudio-5.0\source\Win32\xml\xercesxmldom.pas R:\D2009-Enterprise-D12-RadStudio-6.0\source\Win32\xml\xercesxmldom.pas R:\D2010-Enterprise-D14-RadStudio-7.0\source\Win32\xml\xercesxmldom.pas R:\D7.01

No more xercesxmldom unit in Delphi XE?

≡放荡痞女 提交于 2019-12-01 16:57:39
问题 I'm wondering what happened to the xercesxmldom unit as one of the XML DOM implementations. It seems to have disappeared in Delphi XE. Why? (I searched the docs; couldn't find any relevant info on xercesxmldom disappearing). Edit : these are the sources I have archived: R:\>dir /s /b xercesxmldom.pas R:\D2006-Enterprise-D10-BDS-4.0\source\Win32\xml\xercesxmldom.pas R:\D2007-Enterprise-D11-RadStudio-5.0\source\Win32\xml\xercesxmldom.pas R:\D2009-Enterprise-D12-RadStudio-6.0\source\Win32\xml

insert XML data into mysql with php

拥有回忆 提交于 2019-12-01 14:42:51
Portion of xml file that represents the problem (the xml file has hundreds of customers record) <?xml version="1.0" encoding="utf-8"?> <test> <customer> <name>customer 1</name> <address>address 1</address> <city>city 1</city> <state>state 1</state> <zip>zip 1</zip> <phone>phone 1</phone> <buyerinfo> <shippingaddress> <name>ship to</name> <address>Ship address1</address> </shippingaddress> </buyerinfo> <shippingDetail> <saletax> <saletaxamount>2</saletaxamount> </saletax> </shippingDetail> </customer>... Below is my code //Xml string is parsed and creates a DOM Document object $responseDoc =

How to remove all child nodes of an XmlElement, but keep all attributes?

社会主义新天地 提交于 2019-12-01 02:22:24
How to remove all child nodes of an XmlElement , but keep all attributes? Note, that XmlElement.RemoveAll also removes all attributes. What is a clean, elegant and well-performing way to remove all child nodes? In other words, what is best-practice here? For a truly efficient solution: e.IsEmpty = true; is your fastest and simplest option. It does exactly what you requested: all inner text and nested elements are discarded, while attributes are retained. Would this solution not be simpler? while(e.FirstChild != null) e.RemoveChild(e.FirstChild); Option 1 Use elem.InnerXml = ""; The full

How to remove all child nodes of an XmlElement, but keep all attributes?

ぃ、小莉子 提交于 2019-11-30 22:41:44
问题 How to remove all child nodes of an XmlElement , but keep all attributes? Note, that XmlElement.RemoveAll also removes all attributes. What is a clean, elegant and well-performing way to remove all child nodes? In other words, what is best-practice here? 回答1: For a truly efficient solution: e.IsEmpty = true; is your fastest and simplest option. It does exactly what you requested: all inner text and nested elements are discarded, while attributes are retained. 回答2: Would this solution not be

Read XML file using JavaScript in Chrome

人走茶凉 提交于 2019-11-30 14:33:31
I need to load and read an XML file using JavaScript. The following code works fine in Firefox, IE and Opera: function loadXMLDoc(dname) { var xmlDoc // Internet Explorer try { xmlDoc = new ActiveXObject('Microsoft.XMLDOM') } catch (e) { // Firefox, Opera, etc. try { xmlDoc = document.implementation.createDocument('', '', null) } catch (e) { alert(e.message) } } try { xmlDoc.async = false xmlDoc.load(dname) return xmlDoc } catch (e) { alert(e.message) } return null } But executing this code in Chrome gives me this error: Object# has no method "load" Legacy Code document.implementation

DOM官方定义

天涯浪子 提交于 2019-11-29 20:44:08
DOM Document Object Model 文档对象模型 DOM的官方定义:W3C的DOM,可以使 程序或者脚本(JS或AS\JScript) ,动态的访问或者操作文档的 内容、结构、样式 。 DOM只是一个标准,操作网页的标准。而这个标准(模型)在浏览器中,以“对象”的方式实现。 DOM的分类:核心DOM、HTMLDOM、XMLDOM、EventDOM、CSSDOM、(5大类) 1.核心DOM:提供了操作 HTML文档 (显示数据) 或XML文档(存储数据) 的公共的 属性 和 方法 。 2.HTMLDOM:针对HTML文档,提供的专有的属性和方法。 3.XMLDOM:针对xml文档,提供的xml的属性和方法。 4.EventDOM:事件DOM,提供了很多的常用事件。 5.CSSDOM:提供了操作CSS的一个接口。 DOM中节点的类型: document文档节点:代表整个网页,document文档节点不对应标记。是访问文档中各元素的起点。 element元素节点:元素节点对应于网页中的各标记。 attribute属性节点:每个元素节点都要若干个属性。 text文本节点:文本节点是最底层的节点。 核心DOM公共属性和方法 nodeName:节点名称 nodeValue:节点的值 firstChild:第一个子节点 lastChild:最后一个子节点 parentNode

reading xml file with vbscript

好久不见. 提交于 2019-11-29 11:11:43
I am trying to write a vbscript to automate the configuration of a storage array. I'm having some difficulty figuring out how best to navigate the XML. An example section of my XML: <SERVER> <INTERFACE> <PORT>0</PORT> <IPADDRESS>192.168.1.1</IPADDRESS> <NETMASK>255.255.255.0</NETMASK> </INTERFACE> <INTERFACE> <PORT>1</PORT> <IPADDRESS>192.168.1.2</IPADDRESS> <NETMASK>255.255.255.0</NETMASK> </INTERFACE> </SERVER> So I want to iterate through each interface (there is 5 in reality) and set the appropriate IP and netmask on the correct interface. I'm currently doing this: Set objXMLDoc =

“Not enough storage is available to complete this operation” when base64-encoding a zip file

房东的猫 提交于 2019-11-29 07:56:26
The below code is for converting a zip file to base64 format. Dim inByteArray, base64Encoded, Const TypeBinary = 1 inByteArray = readBytes("F:path/file.zip") base64Encoded = encodeBase64(inByteArray) Private Function readBytes(file) Dim inStream ' ADODB stream object used Set inStream = CreateObject("ADODB.Stream") ' open with no arguments makes the stream an empty container inStream.Open inStream.Type = TypeBinary inStream.LoadFromFile(file) readBytes = inStream.Read() End Function Private Function encodeBase64(bytes) Dim DM, EL Set DM = CreateObject("Microsoft.XMLDOM") ' Create temporary