Questions tagged [xmlnode]

XML document unit (element, entity, attribute, text, comment, notation, even document or it's fragment).

XML document unit (element, entity, attribute, text, comment, notation, even document or it's fragment). XML node types

486 questions
8
votes
1 answer

Check if XML node exists in XSLT

Is there a better way of finding if XML node exists (in XSLT) rather than using: body node exists body node missing
user3767641
  • 313
  • 2
  • 4
  • 14
8
votes
3 answers

Convert XmlDocument object into an XmlNode object - C#?

How do I convert an XmlDocument to a XmlNode in C#? I need to send the entire XmlDocument object to as an input parameter to a .NET web service.
Michael Kniskern
  • 24,792
  • 68
  • 164
  • 231
8
votes
2 answers

Is it possible to get line numbers/positions from a System.Xml.XmlNode when working with a System.Xml.XmlDocument?

The title says it all... Is it possible to get line numbers/positions from a System.Xml.XmlNode when working with a System.Xml.XmlDocument? I want the information so that I can inform the user of where they need to look in their Xml file for…
MadSkunk
  • 3,309
  • 2
  • 32
  • 49
8
votes
3 answers

In C#, how to get XML node value that is white space?

I have a XML node with a value which is a white space. Example: I am using a Serializer to get the data from XML document to store it in an object. Now, the problem I am facing is: If the XML node value contains nothing…
Boris
  • 9,986
  • 34
  • 110
  • 147
8
votes
1 answer

How to get tagname of a TEXT_NODE in java's org.w3c.dom.Node

In the documentation for this interface it states that textnodes all return "#text" for their names instead of the actual tag name. But for what i'm doing, the tag name is necessary. // I'm using the following imports import…
Lucas Ou-Yang
  • 5,505
  • 13
  • 43
  • 62
7
votes
2 answers

How to use Complex types with xs:any / ##any and mixed in code generated by the XSD tool

I have the following complex type in my XML schema:
MrEyes
  • 13,059
  • 10
  • 48
  • 68
7
votes
2 answers

Removing CDATA tag from XmlNode

I have an XmlNode which represents the following xml for example: XmlNode xml.innerText = I want to change this node so that it'll contain the…
Niv
  • 2,294
  • 5
  • 29
  • 41
7
votes
5 answers

Remove empty nodes from a XML recursively

I want to delete the empty nodes from an XML element. This xml is generated from a vendor and i dont have control on xml generation. But since the XML has few empty nodes i need to delete those empty nodes recursively. This xml is got from OMElement…
Dheeraj Joshi
  • 3,057
  • 8
  • 38
  • 55
6
votes
1 answer

XmlNode InnerXml vs OuterXml

I've come across a bizarre situation and I'm hoping that someone who understands better than I do can help me to resolve it. I'm inserting an image into an Xml document such that it can be opened with Microsoft Word. As part of this, I need to add…
user1711233
  • 251
  • 1
  • 8
  • 16
6
votes
1 answer

node js for XMPP protocol?

I want to develop an instant messaging for mobile application, like whatsapp, with nodejs as my backend. I have gone through XMPP protocols and read xmpp.org documentation as well. I referred to this link and I am able to build some of the basic…
Prabhu
  • 840
  • 11
  • 28
6
votes
5 answers

Xml node value from an attribute in VB.net

I have a XML like 1 name1 2
Jigar Shah
  • 175
  • 2
  • 3
  • 13
6
votes
1 answer

Groovy Node.depthFirst() returning a List of Nodes and Strings?

I'm hoping someone will just point out something obvious that I'm missing here. I feel like I've done this a hundred times and for some reason tonight, the behavior coming from this is throwing me for a loop. I'm reading in some XML from a public…
James
  • 1,391
  • 2
  • 14
  • 20
6
votes
1 answer

How to dynamically change attribute of an xml node with c#

I have a c# application that saves user's data to an xml document. I want to be able to dynamically change the attribute of an xml node based on a user entering different criteria into a text box and choosing to save/overwrite the existing file…
user1546315
  • 683
  • 5
  • 16
  • 27
5
votes
3 answers

How to test if a XML element has a text element inside?

I would like to know how could I test the fallowing situation: xxx yyy zzz In the while(reader.Read()), I drop in the XmlNodeType.Element when I'm in the foo and bla1, bla2, bla3...…
Pedro Dusso
  • 2,100
  • 9
  • 34
  • 64
5
votes
2 answers

string to xmlNode delphi (or how to add an xml fragment to TXMLDocument)

I Have a few text strings that contain well formed XML. I would like to be able to (1) turn these strings into IXMLNodes then (2) append them to an existing XMLDocument. Preferably without declaring a new XMLDocument first. This doesn't seem…
sse
  • 987
  • 1
  • 11
  • 30
1
2
3
32 33