xml

Is there a way to reuse an XmlReader?

I have a process that uses an XmlReader. I have already done a lot to squeeze maximum performance out of it. So far we have had huge gains from using the Reader as opposed to XmlDoc or DataSet.GetXml(). We expect to get XML many times a second and I would like to avoid the overhead of recreating the reader every time. I have already cach...

xs:choice unbounded list

I want to define an XSD schema for an XML document, example below: <?xml version="1.0" encoding="utf-8"?> <view xmlns="http://localhost/model_data" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://localhost/model_data XMLSchemaView.xsd" path="wibble" id="wibble"> <text name="PageTitle">Homepage</text>...

how to merge xml string to main xml document object

how can i merge the following xml string <employee> <name>cliff</name> </employee> to my existing xml document object XmlDocument xmlDoc = new XmlDocument(); XmlElement xmlCompany = xmlDoc.CreateElement("Company"); the final output should look like <Company> <employee> <name>cliff</name> </employee> </Compa...

Creating a 'flexible' XML schema

I need to create a schema for an XML file that is pretty flexible. It has to meet the following requirements: Validate some elements that we require to be present, and know the exact structure of Validate some elements that are optional, and we know the exact structure of Allow any other elements Allow them in any order Quick example...

Flex - How to edit a xml file on the server

Hi! I was wondering if it was possible to edit an xml on the server side from a web based flex application. When you use XML files in a Flex application and then compile it to upload it in the server, Flex Buidler generates a swf file with the xml data embedded. How should I do to have access to those XML files?? Thanks for your answ...

XSLT: How to transform partially escaped XML?

I need help transforming an XML file, whose part of it is with escape sequences, into HTML: <?xml-stylesheet type=text/xsl href=XSL_17.xsl?> <Root> <Book> <Author>John smith</Author> <Genre>Novel</Genre> <Details>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Dets&gt;&lt;Ds&gt;&lt;D DN="Pages" DV="381" /&gt;&lt;D DN="Bin...

Schema generated from WCF web service and ASMX are different

I have the following class [Serializable()] [XmlType(AnonymousType=true)][XmlRoot(Namespace="", IsNullable=false)] public class Test { [XmlAttribute()] public string Prop { get; set; } public string Another { get; set; } } I used this class in both a WCF web service (SVC) and an ASMX web service and I'm expectin...

receive in a php(server) a POST send by java (client)

hi guys, i want to receive in a server a xml file sent by java by POST how can e receive that ? and how can e parse the file, in this case a xml file... regards. ...

What is your prefered way to return XML from an ActionMethod in Asp.net MVC?

I am displaying charts that load the data asynchronously because the searches are the work to fetch the data is quite heavy. The data has to be return as XML to make the chart library happy. My ActionMethods return a ContentResult with the type set as text/xml. I build my Xml using Linq to XML and call ToString. This works fine but it's ...

command line tool for XML digital signing

Are there command-line tools for XML digital signing? I have found one here: http://www.codeproject.com/KB/security/xmldsiglic.aspx but it needs .NET Framework and i would prefer it to work without .NET ...

Exporting to XML, including embedded classes

I have an object config which has some properties. I can export this ok, however, it also has an ArrayList which relates to embedded classes which I can't get to appear when I export to XML. Any pointers would be helpful. Export Method public String exportXML(config conf, String path) { String success = ""; try { FileOu...

How to select items from XmlList

My Flash designer is reading an XML stream I'm sending back to the browser (I'm a C# dev). We have this working fine. He is then selecting into an XMLList where a element has its id a certain value i.e. . This is also working just fine. In this XmlList, are Events, that look a little something like this: event startdate ...

Defining xml in an xsd where an attribute determines the possible contents

How would one go about defining something like this in an xsd? <start> <request type="typeA"> <elementOnlyFoundInA /> </request> <request type="typeB"> <elementOnlyFoundInB /> </request> </start> I ran xsd.exe just to get an idea of what it might look like, but it does not appear recognize the relations...

Is there any way to get Visual Studio 2008 to update .net style comments automatically?

I've been writing a lot of VC++ 2008 / CLI software recently and am using the C#/CLI style documentation: /// <summary> /// Function the does stuff /// </summary> /// <param name="someParam">Specifies some option</param> /// <returns>true if it worked</returns> bool DoStuff( bool someParam ); I find myself re-typing those blocks quite...

Reading Java Vectors in from XML using Betwixt Fails

So I'm writing a program which has a large number of classes that need to be written out to XML, and then read in from XML later. I found that Betwixt turns the Classes I have into XML, writes it to file, and then reads back in the same stuff to instantiate a class. Awesome. Just what I wanted. I happen to have a class which is Suppo...

C# XPath Not Finding Anything

I'm trying to use XPath to select the items which have a facet with Location values, but currently my attempts even to just select all items fail: The system happily reports that it found 0 items, then returns (instead the nodes should be processed by a foreach loop). I'd appreciate help either making my original query or just getting XP...

sqlplus report - XML data being truncated

I am running a query that returns XML data and spools to a file. I'm having a problem where the output of the query is being truncated. Here's what it looks like: XMLDATA ---------------------------------------- <?xml version="1.0" standalone="yes"?> <msgs> ...

How to get started with xslt-transformations?

What are good tutorials for that? I mean NOT the ones like "Hi! Today we'll transform <xml>Hello World</xml> to <h1>Hello World<h1>! Good start! Keep learning!" Something like "xlst for 21 days", or "xslt: from novice to professional" :) Thanks, Ilya. ...

Reading XML using XDocument & Linq - check if element is NULL?

I'm using LINQ together with XDocument to read a XML File. This is the code: XDocument xml = XDocument.Load(filename); var q = from b in xml.Descendants("product") select new { name = b.Element("name").Value, price = b.Element("price").Value, extra = b.Element("ext...

Migrating a service from Axis to Axis2 (Java) - Which MessageReceiver should I use?

I'm in the process migrating a service from Axis to Axis2 (Java). The service responds to a simple SOAP request with a bit of "custom" XML in the body like the following: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-in...