xml

Formatting a Value inside XAttribute

I am trying to format a data bound item to just show three decimal points. It is inside a datatemplate written in the C# code. In wpf it was formatted like this <TextBlock Grid.Column="1" Text="{Binding Path=[XValues], Converter={x:Static my:Converters.Format}, ConverterParameter=#.##}"/> and in c# I have this so far new XAttribute...

how does XML and Soap work with WCF ?

I have been asked this question in interview how does XML and Soap work with WCF ? can any one explain this? ...

convert text xml to binary xml in .NET 4

Is there any way to do that in .NET 4, may be with XmlDictionaryWriter? ...

PHP - Parsing XML object created by simplexml_load_string()

I am trying to read an attribute value of the root node of an XML fed into the simplexml_load_string() method in PHP. Here is an example, <user status="Active"> </user> I am trying to read the value of 'status' in the above XML string. --- Here is an update --- Below is the XML Structure, <data status="Active"> <user> <userid>...

Xml Parsing using SAX Parser in the android application.

Hello Team, Can anybody please solve my Issue regarding XML SAX Parsing. I have a small issue that in Android Application When Parsing is done , it goes through the whole response and parse the data. My Issue is that I just want to parse the data from the particular place, So that when I Parse the XML Response, Parsing should be done...

Stripping all elements except one in XML using XSLT

Hello all, I would like to remove all elements from XML except content of element called <source>. E.g.: <root> <a>This will be stripped off</a> <source>But this not</source> </root> After XSLT: But this not I have tried this but with no luck (no output): <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Tran...

Generating custom xml from Itunes xml.

Hi , I need to generate custom xml from Itunes xml library file. I have attached both the itune's xml library excerpt and custom xml format I need to generate. Can anyone pls guide me what would be the best way to get this job done. I have no prior experience in xml handling in C#.any help would be appreciated. please find below t for ...

tell me about parameter q in dismax querry parser (solr)

hey i am trying to use dis-max query parser (http://localhost:8983/solr/select/?q=name&amp;qt=defType=dismax) so can you plz tell me that what is parameter q... i mean what value i pass to it .... coz the above syntax gives an error ...

C# XSLT Transformation Out of Memory

All, I have the below code for Transforming an XML Document using an XSLT. The problem is when the XML Document is around 12MB the C# runs out of memory. Is there a different way of doing the transform without consuming that much memory? public string Transform(XPathDocument myXPathDoc, XslCompiledTransform myXslTrans) { t...

How would I send an NSArray filled with objects over a HTTP POST?

I have a product/shopping list (consisting of product objects with a name, product_id etc) on the iPhone side. I wish to send this list to the server where I will compare the list on the server with the one from the iphone (to merge the changes made and send the merged list back to the iphone). How would I send my array over a HTTP POST...

XML: read children of an element

I'm looking into the possibility of storing settings in an XML file. Here's a simplified version of my code. You don't see it here, but this code is located inside a try block so that I can catch any XmlException that comes up. XmlReader fileReader = XmlReader.Create(Path.GetDirectoryName(Application.ExecutablePath) + "\\settings.xml");...

Problem in Loading xml from specified url using javascript in FF & Google Chrome

Hi, I need to load xml file from specified url using javascript. Here is what i am doing: function GetXMLDoc() { var url = 'http://www.warm.fm/exports/NowOnAir.xml'; var httpRequest = null; try { httpRequest = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { httpRequest = new Acti...

SAX XML Parsing in android

enter code here XML Code is - - Radio 200 - ...

XMLDocument, problem reading Node...

Hello, I am doing the following: System.Net.WebRequest myRequest = System.Net.WebRequest.Create("http://www.atlantawithkid.com/feed/"); System.Net.WebResponse myResponse = myRequest.GetResponse(); System.IO.Stream rssStream = myResponse.GetResponseStream(); System.Xml.XmlDocument rssDoc = new System.Xml.XmlDocument(); rssDoc.Load(...

add xml node at the first of the it's parent node

<?xml version="1.0" encoding="utf-8"?> <users> <user> <firstname>Mark</firstname> <surname>Zhu</surname> </user> </users> this is the user node I want to add in the front of the existing one <user> <firstname>Andy</firstname> <surname>Li</surname> </user> The SimpleXMLElement::addChild can add the in the back of the...

Add a node to an existing XML document

Hi everybody, I am working on a small programm written in C++ using the QT Framework (v. 4.7). The task I want to accomplish is opening an existing xml-document, add a node within its structure and save the document to the file I read it from before. I have tried this using something like that: QFile xmlIn(AFileName); QDomDocument do...

nested LINQ XML subquery not displaying values from root query in asp.net listview?

var subfacets = from l in facets.Descendants("Facet") let FacetName = l.Attribute("Name").Value let DisplayedFacetAttr = l.Attribute("DisplayedName") select new { DisplayedFacetName = (DisplayedFacetAttr != null) ? DisplayedFac...

Android how to get specific preference?

I have the following code in my application in res/xml/preferences.xml: <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"&gt; <PreferenceCategory android:title="Wi-Fi settings"> <EditTextPreference android:key="pref_voice_threshold_top" android:title="@string/title_pref_voicetopt...

AS 3.0 - find the nr of items in an xml that have a specific name before looping thro

I'm trying to resolve the following: I'v got a long xml file with a node called 'ows_Sub_x002d_Site' - this has several different values (e.g Home, about us e.t.c) which i then filter to make sure only items with that specific value are then looped thro to build a menu. That part i got sorted (see below). The problem i have is that i ne...

Why is my service method getting the wrong XML element?

Given the following service contract: [ServiceContract] public interface IMyInterface { [OperationContract(Action = "urn:myns:inputaction", ReplyAction = "urn:myns:replyaction")] Reply Method(Request request); } With this message contract (the reply is, as yet, inconsequential): [MessageContract(Is...