xml

C# RSS Reader

I have been wanting to make a RSS reader for a while now (just for fun), but I don't have the slightest idea of where to start. I don't understand anything about RSS. Are there any good tutorials on RSS and how to implement it in an application (not a tutorial on how to make a RSS reader, that would be too easy). Thanks! ...

customize deserialization sample in C#?

Hello everyone, I am looking for a sample, which could let me deserialize an XML stream encoded in UTF-8 into a field of a class. More specifically, I have a class like, class Foo { string abc; byte[] bcd; } and abc maps to XML element "Abc" and bcd maps to XML element "Bcd", and I want to get the stream for bcd and retrieve ...

How do I get my PHP application to re-use the same window for playing music?

Below is the code for my player which will automatically generate a playlist.xml file according to the songs selected by the user. I kept this file as player.php in my root folder, and in the form I give: <form method="post" action="/player.php" target="_blank"> so this player is opening and playing songs according to what is selected...

SSIS output parameters and XML

It seems that when using the OLE DB Command within SSIS problems occur when handling stored procedures that return xml: view bug description I have to use a procedure that is built in such a way and get hold of the xml even if it is just as a string value. Does anybody know of a workaround to the bug linked above that doesn't involve ch...

XSL:decimal-format with multiple possible formats

Hi All, I have an interesting problem with XSL. We have an XML Input file that contains next to the content several settings that define how we output the content. Currently I'm struggling with the formatting of the numbers within the XSL file. The following formats are possible: 1,234.5 1.234,5 1234,5 1234.5 I get these formats as...

Select records from XML column (SQL Server 2005) based on node order

I have a column in a SQL Server 2005 table defined as an XML column. Is there a way to select records from this table based on the order of two nodes in that column? For example, we have the following structure in our XML: <item> <latitude/> <longitude/> </item> I want to see if there are any records that have latitude/longitu...

Anyone familiar with integrating UPS Worldship?

I've just been tasked by my boss to implement in a week a way for a remote shipper to be able to access our system and obtain orders they need to process, and print a packing label from UPS Worldship. This remote office isn't part of our business; they would be accessing our systems via a web front end (what amounts to an extranet) - on...

How would you represent this XML in an object?

<FileTransferSettings> <UploadPath src="user">C:\uploads</UploadPath> <DownloadPath src="app">C:\downloads</DownloadPath> </FileTransferSettings> I'd want to deserialize this XML into a FileTransferSettings object with 2 properties - UploadPath and DownloadPath. But I also want to preserve the src attribute for each property in a...

C#: Render object as XML

I am looking for a way to convert an object tree to XML. It would be fun to write, but I am sure someone has already written it. Here is my wish list: It should not care about constructors It should ideally handle circular references (not too fussed how) It should not require changes to the objects - e.g., no custom attributes It shoul...

When using the XPath binding expression, can you get back InnerXml rather than InnerText?

I'm binding a control to an XmlDocument and using the "XPath" binding expression to output the data: <div class="Bio"><%# XPath("Biography") %></div> However, this returns the InnerText property of the "Biography" element, not the InnerXml. This means it strips all inner tags from it, which is not what I want. I looked through the X...

Xml data in an ASP.Net Dynamic Data Site

I have this problem where I can't get my dynamic data web app to save xml data into a text field. Maybe this is a common problem but searching the web doesn't give me any answers... So heres the steps to recreate my problem: I have database with a table that has a column of type "ntext" (Sql Server 2005). I create a new Dynamic Data E...

Create XPathDocument from XmlElement

I'm using a webservice which returns an XmlElement object to my c# program. I would like to read information from the XmlElement using Xpath. What is the best way to create an XPathDocument from the XmlElement? ...

c# Detect xml encoding from Byte Array?

Well i have a byte array, and i know its a xml serilized object in the byte array is there any way to get the encoding from it? Im not going to deserilize it but im saving it in a xml field on a sql server... so i need to convert it to a string? ...

Default support for xinclude in Java 6?

I see in my application that xinclude inside my parsed XML file does not work within my Java XSLT conversion. However, although I do: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setXIncludeAware(true); I'm not specifically setting the transformer factory as System.getProperty("javax.xml.transform.Tr...

Order by not working for more than 10 items

I am trying to sort a xml using linq queries using the following code Dim SortedFields = From field In feedXML.Descendants("fields") Dim sFieldList = From field In SortedFields.Descendants("field") Order By field.@position The xml is shown below, but the issue is it is ordering it in the following order 1,10,11,12,13,14...19,2,3,4,5,6...

XSLT mapping algorithm

I have a particular problem I'm not sure how to approach. Here at the office there is this large unwieldy XSLT we have for adapting one type of XML to another. The problem is that it's not very consistently written and very difficult to follow. In the ancient creation of this stylesheet, it seems it was forgotten exactly what it does. ...

How can I ignore DTD validation but keep the Doctype when writing an XML file?

I am working on a system that should be able to read any (or at least, any well-formed) XML file, manipulate a few nodes and write them back into that same file. I want my code to be as generic as possible and I don't want hardcoded references to Schema/Doctype information anywhere in my code. The doctype information is in the source d...

How can I convert a simple XMLList to an Array of Strings without a loop?

How can I convert the following XMLList to an Array of Strings without using a loop? <labels> <label>All</label> <label>your</label> <label>base</label> <label>are</label> <label>belong</label> <label>to</label> <label>us.</label> </labels> I want this result: ["All","your","base","are","belong","to","us."...

Can I color different parts of text in a WPF TextBox?

I've got a WPF TextBox into which my users type XHTML. XAML... <TextBox Name="TextBoxContentBody" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" FontFamily="Consolas" ... /> It looks like this: I'd rather that it looked like this (Photoshopped mock-up): ...

XSLT - Best way to split and render comma separated text as HTML

I have some data in an XML element that looks like this: <item value="category1,category2">Item Name</item> The bit I'm interested in is the value attribute. I'm able to get the data contained in this attribute into a template which looks like this: <xsl:template name="RenderValues"> <xsl:param name="ValueList" /> <xsl:value-of sel...