xml

What's the equivalent of XMLHTTP from VB6 in C# .Net 2005?

I'm trying to convert some code that worked great in VB, but I can't figure out what objects to use in .Net. Dim oXMLHttp As XMLHTTP oXMLHttp = New XMLHTTP oXMLHttp.open "POST", "https://www.server.com/path", False oXMLHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" oXMLHttp.send requestSt...

XML Data Binding with Namespaces

I want to use data binding with an XML document to populate a simple form that shows details about a list of people. I've got it all set up and working like so right now: <Window x:Class="DataBindingSample.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Ti...

How do I get the stream of header/footer in a WordprocessingDocument

Hi, I need to know how I get the stream of the headers and footers of a WordprocessingDocument. I get the MainDocument by the MainDocumentPart of a WordprocessingDocument. Do you know how I get the header? I tried to use the method GetPartsOfType but it returned null. Greets Sebastian ...

XML Text Format

Does anyone know of a good program where I can paste in xml (getting it from a System.out in my java class) and it will format the xml so it's not a really long line of text? ...

How should I configure Jetty 7 pre3 to use oracle JDBC source?

All stuff is running under Windows XP Pro SP2/32-bit. I have downloaded Jetty 7 pre3 from http://dist.codehaus.org/jetty/jetty-7.0.0-prereleases/jetty-7.0.0pre3/jetty-assembly-7.0.0pre3.zip>dist.codehaus.org. I have extracted jetty to C:\jetty-7.0.0pre3\ (so I have C:\jetty-7.0.0pre3\bin\ and other dirs) I have put my webapp into C:\jet...

Rebinding Report to new XML XSD

I cannot for the life of me find an example of what I need. I have a report that is bound by xsd. How can I take this report in c#, and set the datasource to a new xml file? Every possible way that I've tried just throws me a nice logon screen. I know the files exists in the places that it is looking, and there is obviously no username ...

Converting XML to JSON using Python?

I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate weather widgets on a multitude of web sites. We're looking now into Pytho...

Castle Windsor: How to wire up a component to a factory property rather than method

I have the following component public class MyTimer : IMyTimer { public MyTimer(TimeSpan timespan){...} } Where timespan should be provided by the property ISettings.MyTimerFrequency. How do I wire this up in windsor container xml? I thought I could do something like this: <component id="settings" service="MySample.ISettings...

How do I iterate through DOM elements in PHP?

I have an XML file loaded into a DOM document, I wish to iterate through all 'foo' tags, getting values from every tag below it. I know I can get values via $element = $dom->getElementsByTagName('foo')->item(0); foreach($element->childNodes as $node){ $data[$node->nodeName] = $node->nodeValue; } However, what I'm trying to do, i...

Select XML nodes as rows

I am selecting from a table that has an XML column using T-SQL. I would like to select a certain type of node and have a row created for each one. For instance, suppose I am selecting from a people table. This table has an XML column for addresses. The XML is formated similar to the following: <address> <street>Street 1</street> <c...

What is standard CLR XML for a concrete generic that is an array?

This is a simple issue of me not knowing proper Xml syntax. In castle windsor I can duplicate this line of code: IoC.Container.AddComponent<IInputRequestedDialog<string>, SealsInputDialog>("seals"); With this Xml: <component id="seals" service="MyApp.InputRequestedDialog`1[[System.String]], MyApp" type="MyApp.SealsInputDia...

XML Parsing - SAX vs. DOM. vs. ElementTree

Python has several ways to parse XML... I understand the very basics of parsing with SAX. It functions as a stream parser, with an event-driven API. I understand the DOM parser also. It reads the XML into memory and coverts it to objects that can be accessed with Python. Generally speaking, it was easy to choose between the 2 depend...

Unable to translate Unicode character

I have an ASPX page that creates an XMLDocument object from SQL data and then transforms it into another XML document (RSS feed) using an XSLT file with XPathNavigator and XslCompiledTransform. Occasionally the data will contain smart quotes (\u2019) which results in an error (Unable to translate Unicode character \u2019 at index 947 to...

Is it possible to set a default value when deserializing xml in C# (.NET 3.5)?

Hello all, I've got a little problem that's slightly frustrating. Is it possible to set a default value when deserializing xml in C# (.NET 3.5)? Basically I'm trying to deserialize some xml that is not under my control and one element looks like this: <assignee-id type="integer">38628</assignee-id> it can also look like this: <assig...

PHP DOM: rather newbie question

I've just started tinkering with XML manipulation with PHP, and i've stumbled into something unexpected. Here's the XML i'm using as a test input: <list> <activity1> running </activity1> <activity2> swimming </activity2> <activity3> soccer </activity3> </list> Now, i was expecting that this PHP code would output 'activity1...

Free XML Formatting tool

Hi, Is there a free XML formatting (indent) tool available where I can past an XML string and have it formatted so I can read the XML document correctly? Thanks Edit ~ I am using XML Notepad on Windows XP. ...

How to send xml to asp page using webrequest from asp.net ?

I want to post an xml document to an asp page from an asp.net page. If I use WebRequest with content/type text/xml the document never gets to the asp page. How can I do this ? ...

Inserting data in XML file with PHP DOM

I was trying to insert new data into an existing XML file, but it's not working. Here's my xml file: <list> <activity>swimming</activity> <activity>running</activity> <list> Now, my idea was making two files: an index page, where it displays what's on the file and provides a field for inserting new elements, and a php page whi...

Adding spaces between strings

Hi, What's the best way of adding spaces between strings myString = string.Concat("a"," ","b") or myString = string.Concat("a",Chr(9),"b") I am using stringbuilder to build an XML file and looking for something efficient. Thanks Edit ~ Language VB.NET ...

In C#, what is the best method to format a string as XML?

I am creating a lightweight editor in C# and would like to know the best method for converting a string into a nicely formatted XML string. I would hope that there's a public method in the C# library like "public bool FormatAsXml(string text, out string formattedXmlText)", but it couldn't be that easy, could it? Very specifically, what...