xml

receive xml file via post in php

Hi, I'm looking for a PHP script that can accept an XML file via a POST, then send a response.... Does anyone have any code that could do this? So far the only code I have is this but not sure about the response or if indeed I am even going in the right direction as XML characters are not saved correctly. Any ideas? <?php if ( $_SER...

Load nested XML using LiNQ

I recently asked a question regarding how to Save a list with nested elements to XML but now I am trying to write the loader for the class and have run into problems with it. I am attempting to reverse the answer given (thanks Jon). I believe my core LINQ query is ok, it is the recursion I am struggling with. Here is my code so far (fo...

XSLT; finding most frequent element value in a document

Apologies if this is a very simple question; I don't use XSLT very much and I can't find much advice on the web, as there is lots of pollution in search results! I have an XML document in the following form. Its main purpose is to be reformatted in a few ways by XSLT for display in a couple of different formats. <desk> <drawer> <co...

Encode xml column values as xml in sql server

I have a method that is taking vales directly from the database, building a string of xml and then writing the xml to a file. This is fine until I get special characters eg "'", "<", "&" etc. Does anyone know of something in Sql Server that would allow me to encode the values as i select them; for example; select encode(service_status...

Are Nested DTDs possbile?

Can an XML file reference two DTDs? Can a DTD reference elements from another external DTD? ...

Does Rails' Ajax support make JSON or XML an easier format to work with?

Being new to Ajax, I would like to understand which data exchange format - JSON or XML - would be easier to work with while doing Ajax in Rails. Do the various Rails helpers make one or the other format easier to deal with or does it depend on the context or does it not matter at all? ...

Nokogiri: How can I add a child to a node at a specific position?

Hello all, I have a node which has two children: an XML text and an XML element. <h1 id="Installation-blahblah">Installation on server<a href="#Installation-blah" class="wiki-anchor">&para;</a> In this case the XML text is: Installation on server and the XML element: <a href="#Installation-blah" class="wiki-anchor">anchor;</...

Firefox 3 and XML/XSLT

Firefox 3 and XML/XSLT I am relatively new to developing web apps with client-side processing in Firefox. I have a few straight-forward questions regarding the use of XML/XSLT in Firefox. I send an initial XML document with an XSLT reference to the browser. The browser successfully transforms the XML to XHTML using the referenced XSL...

jquery IE8 selector bizarreness

I'm working with an xml node of the following structure: <CF> <T> <TX>title</TX> <em>15:2:</em> </T> <KW> <TX>SOMETHING ELSE</TX> </KW> <!-- OTHER TAGS, SOME OF WHICH HAVE A <TX> CHILD --> </CF> Things work more or less as I expect in firefox, but I'm getting weird behavior in IE8. For example, the following gives me a jque...

Problem with node.GetElementsByTagName in C#

I have a really simple XML file that I'm trying to read, but I can't seem to get it working. Here is the XML file: <?xml version="1.0"?> <Results><One>45364634</One><Two>-1</Two><Three>B</Three></Results> I am trying to get the contents of two like this: XmlNode node = doc.DocumentElement.SelectSingleNode("/Results/Two"); or Xml...

.NET and TSQL "For Xml Auto" Splits XML Result

I'm using some TSQL with 'For XML Auto'. If I run the TSQL in management studio, I get a single row. If I fill the DataTable using the DataAdapter.Fill() command, I get two results. It appears that the results are split in the middle of one of the tags. It is not a huge XML file, in fact its quite small (perhaps 20 lines), so size is...

How to create object collection from an xml

I have an xml like the following <DataCollection> <Data> <Name>John</Name> <Age>30</Age> </Data> ... more person </DataCollection> I want to create an object(or some type) collection with Name, Age as fields. One problem that I have is I don't know the structure before hand (all i know is, there will be DataCollection an...

Form to search XML document

I got a tutorial from W3CSchools on XML and XSL, I have three files (Please see code below) XML - cdcatalog.xml XSL - cdcatalog.xsl HTML - search.htm What Im trying to do is build a HTML search form to search the XML document, ive change some artist names within the XML file so for example if i did a search for Bob Dylan these three det...

IDE for XSLT stylesheets

What is the best IDE for creating and debugging complex XSLT stylesheets? For debugging, the ability to set breakpoints and step through the source would be great. I am interested in all options both commercial and free. ...

Why use BufferedReader in this case?

What is the difference between using a BufferedReader around the StringReader in the following code vs using the StringReader only? By loading up the DOM in line 2 of both examples, it seems like the BufferedReader is not necessary? InputSource is = new InputSource(new StringReader(html)); Document dom = XMLResource.load(is).ge...

XSL: Counting Previous Unique Siblings

OK, I want to apply a XSL style sheet that counts the previous unique "ROLE" nodes and spits out the following output format of @name the number of unique ROLE nodes prior to the current nodes. I've wasted several hours on what should be an easy thing to implement. I have tried to implement this in several ways including the Muenchian...

Update elements within Nested Xml

I have Xml which looks like this: <DataMapper xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <SqlTable /> <Level_01s> <DataParameter> <SqlTable>MY-Table-Name</SqlTable> <Children> <DataParameter> <SqlTable>MY-Table-Name</SqlTable> <Ch...

Eclipse 3.5: How to get file name from Editor?

Hi, Can anyone tell me how to get file name from editor? I just made my own editor to open xml file and create a few section to display the data. Now I want to read the XML file and place it inside the section. I think I now how to read xml data but I don't know how to access the file name so that it can be open. Thanks ...

Validating Xml with Xsd

I'm running into real difficulties validating xml with xsd. I should prefix all of this and state up front, I'm new to xsd and validation, so I'm not sure if it's a code issue or an xml issue. I've been to xml api hell and back with the bajillion different options and think that I've found what would be the ideal strategy for validating ...

Parsing xml namespaces using ajax

<item> <guid>http://jahboo.fliggo.com/video/kPZj01cs&lt;/guid&gt; <pubDate>Tue, 10 Mar 2009 18:31:38 -0500</pubDate> <title>How to be perverted with water proof cam</title> <author>Jennisita@fliggo</author> <link>http://jahboo.fliggo.com/video/kPZj01cs&lt;/link&gt; <description> This vid shows how easy it is to make perverted vids with ...