Questions tagged [xmldom]

The abstract tree structure of an XML document

The abstract tree structure of an XML document See:

The XML DOM is supplemented by the SGML Declaration for XML 1.0 and the XML Infoset.

272 questions
32
votes
2 answers

DOM Level 3 XPath in Internet Explorer

I just installed IE10 on my Windows 7, and I've noticed that, even if I'm glad that XMLs from AJAX requests are now compatible DOM documents, a rather basic function like document.evaluate is still not supported. What's worse is that, since those…
MaxArt
  • 22,200
  • 10
  • 82
  • 81
19
votes
3 answers

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

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…
usr
  • 168,620
  • 35
  • 240
  • 369
13
votes
2 answers

PHP XML DOM Uncaught exception 'DOMException' with message 'Wrong Document Error'

I am trying to learn XML and I know this is a problem with not properly importing the Nodes. But I can't quite figure it out. I've been looking around and most people don't have multiple child elements like I do with the departments. Here is my XML…
Grant
  • 532
  • 2
  • 7
  • 21
8
votes
1 answer

IXMLDocument exclude xml declaration

I am trying to get xml text from an IXMLDocument like so. Doc.XML.Text; This gives me the xml text but it includes the xml declaration. Is there a way I can get the xml text excluding the xml declaration. I could always…
energ1ser
  • 2,703
  • 4
  • 24
  • 31
8
votes
4 answers

Read XML file using JavaScript in Chrome

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…
user2711066
  • 169
  • 2
  • 2
  • 10
7
votes
2 answers

reading xml file with vbscript

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…
knoxvillain
  • 83
  • 1
  • 1
  • 3
7
votes
1 answer

How to silent all the warning messages of XML DOM in Node.js

I was using a node module xmldom. However, it always prints out a huge chunk of warnings and errors like the following: @#[line:484,col:1] [xmldom warning] attribute "hidden" missed quot(")!! @#[line:517,col:1] [xmldom warning] …
Jeff Hu
  • 714
  • 1
  • 8
  • 20
6
votes
2 answers

No more xercesxmldom unit in Delphi XE?

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…
Jeroen Wiert Pluimers
  • 23,965
  • 9
  • 74
  • 154
6
votes
1 answer

To uncomment a commented node in a XML file using C#

I have a XML file which has a node which is commented out. I have created this node using the syntax: relTableCommentedNode = xDoc.CreateNode(XmlNodeType.Comment, "RELTABLECOMMENTED", "np"); What is the best approach to uncomment this node? Can I…
Ananth
  • 10,330
  • 24
  • 82
  • 109
6
votes
1 answer

Traversing all nodes in an XML file with VBScript

I have written a VBScript which is supposed to tranverse all nodes in an XML file, irrespective of the depth of the tree. This it does well except that the node names for the those nodes which are 2 or more levels deep are not displayed. I need the…
rob dixon
  • 61
  • 1
  • 1
  • 2
5
votes
4 answers

Generate XML document in PL/SQL from Oracle tables

I have to generate XML documents in PL/SQL from some tables in Oracle. I have never done this before, and I have found there seem to be a few main ways to do it: xmldom API xml functions (such as xmlelement, xmlagg, xmlroot) dbms_xmlgen…
FrustratedWithFormsDesigner
  • 26,726
  • 31
  • 139
  • 202
5
votes
2 answers

java xml document.getTextContent() stays empty

I'm trying to build an xml document in a JUnit test. doc=docBuilder.newDocument(); Element root = doc.createElement("Settings"); doc.appendChild(root); Element label0 = doc.createElement("label_0"); root.appendChild(label0); String…
xtofl
  • 40,723
  • 12
  • 105
  • 192
4
votes
3 answers

PL/SQL Raw datatype variable comparison

Is it possible to compare variables of raw datatypes? I'm working with XMLDOM.DomNodes, which is records with one field by itself: TYPE DOMNode IS RECORD (id RAW(12)); So I have two nodes, then could I compare them by their id fields? I tried…
Andrey Khataev
  • 1,303
  • 6
  • 20
  • 46
4
votes
1 answer

IXMLDOM does not recognize XPath last() function?

Good day! I'm working with Delphi 2009 and MSXML2_TLB library (IXMLDOM). I need to select the last Meeting node: Doc := CreateOleObject('Microsoft.XMLDOM') as IXMLDomDocument; Doc.loadXML(XmlStr); tmpNode:=…
Vojtech
  • 2,533
  • 9
  • 34
  • 65
4
votes
1 answer

What JavaScript DOM algorithms behave differently with an `XMLDocument` than with an `HTMLDocument`?

The Mozilla MDN documentation for XMLDocument includes the following note — emphasis mine: The XMLDocument interface represents an XML document. It inherits from the generic Document and does not add any specific methods or properties to it:…
ELLIOTTCABLE
  • 17,185
  • 12
  • 62
  • 78
1
2 3
18 19