xml

Rails equivalent of respond_to |format| with a straight render

I'm working with ActiveResource a lot so my service models are only using XML. Thus, I have no need for a respond_to block, I literally just render :xml => @model I can't however figure out how to render a 404 header using this. I've had to resort to respond_to, which I think adds a few unnecessary method calls. Here's what I'm using...

Do I use fopen or curl to load an XML file given a URL in PHP

I have an XML file I can get via a URL. I know I can get the file using fopen, but sometimes I've seen scripts use curl. Is there an advantage to using curl over fopen to get XML files? ...

building an XML service parsing library

This is more of a design question I suppose. My company offers a web service to our client that spits data out in a custom xml format. I'd like to build a java library we can offer so our customers can just feed it the url and we will turn it into a set of POJOs built from the response. I can obviously just create a library that will d...

Can ElementTree be told to preserve the order of attributes?

I've written a fairly simple filter in python using ElementTree to munge the contexts of some xml files. And it works, more or less. But it reorders the attributes of various tags, and I'd like it to not do that. Does anyone know a switch I can throw to make it keep them in specified order? Context for this I'm working with and on a...

Best way to parse XMPP-like XML streams?

I am working on a server application which receives data over a TCP socket in an XMPP-like XML format, i.e. every child of the <root> element essentially represents one separate request (stanza). The connection is closed as soon as </root> is received. I do know that I must use a stream parser like SAX, somehow. Though, for convenience, ...

Receiving XML from Actionscript on Servlet - Invalid Stream Header

I have an ActionScript File sending XML to my servlet. I am only getting empty arrays on output. In ActionScript I checked and I am in fact sending the correct XML. Anyone know what Exactly I'm doing wrong? Exception error is: java.io.StreamCorruptedException: invalid stream header package myDungeonAccessor; try { Sys...

Using Firefox XML DOM to parse XML(RSS)

Any example on how to parse/have access to simple RSS feed elements in JS? I don't want to use any Microsoft specific objects. ...

Would anybody mind taking a look at my XML structure?

I am relatively new to this but I was hoping somebody could offer up a good critique of this XML structure I put together. I am not looking for anything in depth but rather if somebody notices anything inherently wrong with the structure (or any tips to make it better) I'd greatly appreciate it. We have a large amount of products that ...

XML Output is Truncated in SQL

Hi, I need to return my result set in XML and this works fine, but if the number of records are increased, my xml output is truncated here is my query select t.id,t.name,t.address from test FOR XML AUTO, ROOT('Response'), ELEMENTS However I have set some option to increase the output result set like.. Tools --> Options --> Query Resu...

Dynamically load _gallery_ (not album) in SlideShowPro using SWFObject

Hi all. I have been successful in dynamically loading an album in SSP before, but using SSP Standalone. I did it like this: var flashvars = { xmlFilePath: "http://site.com/ssp_director/images.php?album=5" } What I'm looking to do now, though, is dynamically load a gallery when the page loads, using text entered in the javascript, ...

XMLReader in silverlight <test /> type tag problem

Hi I am parsing XML in silverlight, in my XML I have one tag is like <test attribute1="123" /> <test1 attribute2="345">abc text</test1> I am using XMLReader to parse xml like using (XmlReader reader = XmlReader.Create(new StringReader(xmlString))) { // Parse the file and display each of the nodes. while (reader.R...

Asp.net mvc small amount data storage

Hi there, I am writing some learning tests (i.e. what's the answer for...; choose correct options...). Now my question is, how should I store them. SQL db seems quite an overkill, but I really don't know what would be the best choice if I wanted to select random subset of questions etc. Perhaps some simple xml files? Thanks for advice. ...

JSONPBehaviour and multiple formats from WCF service.

Hi, I have a WCF service which I would like to product XML and JSON depending on the URI template. So in my service contract I have methods like the following [ServiceContract] public interface MultiFormatContract { [OperationContract] [WebGet(UriTemplate="/json/data", ResponseFormat = WebMessageFormat.Json)] [JSONPBehavior(callb...

XML Parsing C++

Hi All, I am using MSXML2 for XML Parsing. I am using IXMLDOMNodePrtr , IXMLDOMDocumentPtr ans so on for XML Parsing. I have observed that while my application ends Private Bytes usage of EXE is say 30 MB and it keep on reducing. Previously i was thinking that their might be some memory leaks there. I have different tolls for the same a...

NSXMLParser, Issue with ASCII Character Set

Hi all <Feeds> <channel> <ctitle>YouTube</ctitle> <cdescription>YouTube - Recently added videos</cdescription> <items> <recentlyAdded> <item> <serverItemId>1</serverItemId> <title>Fan Video CARS</title> <author>mikar1</author> <guid isPermaLink='false'></guid> <link>http://www....

using an expression inside XContainer()

I have two xml files but one file will contain an extra field. Ideally I would like to add an if statement withing the XElement but I dont think its possible. Obviously this is horribly wrong, its just an example to give you some idea what I would like to do: XElement xml = XElement.Load(pfileLocation); xml.Add(new XElement("...

Have a link that is imported in xml, clickable to execute a function

Ok, here's the question, I have an xml doc that is being import into an AS3 file and then with .htmlText, appending it to a movie clip. An example of what this looks like is: <abstract><![CDATA[<p><strong>AEO Times Square</strong> Store Wins Prestigious SEGD Merit Award for Dynamic Environments <a href='event:OpenArticle1'>View Article...

Comparing XML in SSRS

I'm new to SSRS. We'll have two slightly different chunks of XML in a single row of an SQL Server database table. In an SSRS report we'll want to show only the differences between the XML chunks. I don't know how to do this, but I suspect the XML Type in SQLServer 2005 might be useful, or XSLT transformations in SSRS. Could anyone point ...

Read XML with PHP

I am trying to check a field in some XML that is returned from an outside. The XML is returned in a variable call $out and when you view the source of the page you get a XML output of the following, <?xml version="1.0" encoding="UTF-8"?> <ResponseBlock Live="FALSE" Version="3.51"> <Response Type="AUTH"> <OperationResponse> ...

Is it possible to validate XML against multiple schemas in PHP?

Hi, I'm wondering if it is possible to validate xml against multiple schemas in PHP or I have to merge my schemas somehow. Thanks for an answer! ...