How to remove an XmlNode from XmlNodeList
I need to remove an XmlNode based on a condition. How to do it? foreach (XmlNode drawNode in nodeList) { //Based on a condition drawNode.RemoveAll(); //need to remove the entire node } ...
I need to remove an XmlNode based on a condition. How to do it? foreach (XmlNode drawNode in nodeList) { //Based on a condition drawNode.RemoveAll(); //need to remove the entire node } ...
Unit testing my serialization code I found one failed because I had attributes listed in a different order (I'm just comparing the XDocument.ToString() values) and while I could fix that, it really doesn't matter to me in what order the elements or attributes appear as long as they're all there with the right name at the right level of h...
I have some XML which contains records and sub records, like this: <data> <record jsxid="id0x0b60fec0" ID="12429070" Created="2008-10-21T03:00:00.0000000-07:00"> <record jsxid="id0x0b60ff10" string="101"/> <record jsxid="id0x0e64d8e8" string="63"/> <record jsxid="id0x2fd83f08" string="Y"/> </record> <record jsxid="id0x0b60fec0"...
how do you get the attribute of an element? ...
Hi there, I am facing a problem, I have created XML file,but I can't view it/output it.I know there is no way to output created XML file. Can anyone please suggest what is better way of creating xml files? 1) create xml with DocumentBuilderFactory and then parse it Or 2) manually create hardcoded xml and save it on sd card and then acce...
One Possible (working) Solution: Private Sub ReadXMLAttributes(ByVal oXML As String) ReadXMLAttributes(oXML, "mso-infoPathSolution") End Sub Private Sub ReadXMLAttributes(ByVal oXML As String, ByVal oTagName As String) Try Dim XmlDoc As New Xml.XmlDocument XmlDoc.LoadXml(oXML) oFileInfo = New InfoPathDocu...
Hi all, I'm playing with xproc, the XML pipeline language and http://xmlcalabash.com/. I'd like to find an example for streaming large xml documents. for example, given the following huge xml document: <Books> <Book> <title>Book-1</title> </Book> <Book> <title>Book-2</title> </Book> <Book> <title>Book-3</title> </Book> <...
I'm able to return JSON and partial views (html) as a valid ActionResult, but how would one return an XML string? ...
How can one call a ColdFusion function, passing in attribute values as arguments, inside an XML transform template statement. For example, something like: <xsl:template match="date"> <cfoutput>#DateFormat(now(), <xsl:value-of select="@format"/>)#</cfoutput> </xsl:template> Such that the following XML: <date format="mm/dd/yy" /> ...
Hello Pythonistas, I need to read and serialize objects from and to XML, Apple's .plist format in particular. What's the most intelligent way to do it in Python? Are there any ready-made solutions? ...
Hi. I'm trying to produce this XML statement (minus the formatting and specific values): <swatchcolor RGB="c5c5c5"> <sldcolorswatch:Optical Ambient="0.520000" Transparency="0.000000" Diffuse="0.800000" Specularity="1.000000" Shininess="0.400000" Emission="0.000000" /> </swatchcolor> I'm using this chunk...
I often have to deal with XML documents that contain namespaced elements, but doesn't declare the namespace. For example: <root> <a:element/> </root> Because the prefix "a" is never assigned a namespace URI, the document is invalid. When I load such an XML document using the following code: using (StreamReader reader = new Stream...
I have a WCF service which accepts a string as a paramter for one of its operation contracts. This string however has xml content in it. I need to convert this into a class that is marked as a DataContract but is not exposed to the outside world. I need to use the DataContractSerializer because the class members have the [DataMember...
I'm working with some very unintuitive xml (all the tags are things like "TX", "H", "VC"). I'd like to make a copy of this data, but with all of the tags renamed to what they actually mean. Can I create a new, empty document to put my new, nicely named tags in to? I've tried this: doc = (new DOMParser()).parseFromString("", 'text/xm...
I serialize my c# object to xml, then got varchar such as '2009-05-09T13:50:59.6361485+08:00'. But SQL Server return following messgae: 'Result: Msg 241: Conversion failed when converting date and/or time -- from character string.' after I execute following sql: declare @msg xml set @msg='<root><date>2009-05-09T13:50:59.6361485+08:00...
I have this PHP web application. It has a link to an XML file to which I have no control. How can I make the XML display nicely? I just want it to line up in a table or it can even look like a data file. Can I attach an XSLT file or style sheet to the XML file from the outside i.e. I wish I could, but I can't put this in the XML: <...
Due to problems associated with installing MSXML4 (like this) we want to switch to MSXML6. Are there any known issues associated with this or is such transition smooth and painless? ...
I'm passing a query to an internal application that runs that query and returns the result, the connection is to a CSV file and I'm connecting with the Provider=Microsoft.Jet.OLEDB.4.0 I'd like to join to strings in to one column but I'm getting an error. Can this be done, does anyone know how to do it? Example of what I'm doing: sel...
hello all Currently i am working with xml and have to populate xml file from C# object serializaion.Suppost below is the xml format what i want to do. <DVD> <Starring> <Star position="actor"> Tom Hanks </Star> <Star position="actress"> Robin Wright </Star> <Title>Forrest Gump</Title> </Starring> <...
I've got an XHTML document, and I want to select the only table in it with class="index". If I understand correctly, the descendant axis will select all nodes directly and indirectly descending from the current node, so here's what I've got. //descendant::table[@class="index"] It doesn't appear to be working when tested with xmlstar...