xml

Is there an example on how to use Spring 3.0 content negotiation for RESTful services?

I was reading the Spring 3.0 Documentation and Blog Posts (followups) on how to create REST style services with Spring MVC but I can't find any working example on how to use the ContentNegotiatingViewResolver. I have a test controller like this @Controller public class IndexController implements Serializable { @RequestMapping("/inde...

How to stop XmlSerializer from adding newlines to blank elements

I am serializing an object like this: XmlSerializer serializer = new XmlSerializer(obj.GetType()); using (StringWriter writer = new StringWriter()) { serializer.Serialize(writer, obj); return writer.ToString(); } (having created the nodes like this) XmlElement newchild = doc.CreateElement(nodename); newchild.Inner...

SQL Server 2005 select for XML path with union in sub-selection problem

Hi There, I'm rather experienced with SQL server "select for XML path" queries but now i run into a strange problem. The following query works fine: select ( select 'Keyfield1' as "@Name", t1.Keyfield1 as "Value" from MyTable t1 where t1.KeyField1= t2.KeyField1 and t1.KeyField2= t2.KeyField2 for xml...

Split XML in Multiple XML files

Hi guys , i have following xml file as input .... <?xml version="1.0" encoding="ISO-8859-1"?> <T0020 xsi:schemaLocation="http://www.safersys.org/namespaces/T0020V1 T0020V1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.safersys.org/namespaces/T0020V1"&gt; <INTERFACE> <NAME>SAFER</NAME> ...

How can I save XML data to a file with XML::Simple?

I'm using XML::Simple package to import an XML file and change a few properties of some of the child tags. The change is visible when the data is dumped with: print Dumper($data); But how can I write this edited data into a new XML file? I did go through the CPAN page, but some code regarding this would really help. ...

Should I set up a socket connection on my computer?

I want to learn everything about XML sockets and server-side stuff, but right now I'm just trying to get my stuff to work. Should I set up a socket connection on my computer? I'm trying to use Flash with an old arcade game. The instructions on Adobe livedocs seems easy. I don't know if I'm approaching this correctly. I need a XML socket...

How do I combine results from zip-filter queries on an xml tree in Clojure?

I want to combine the results of three zip-filter queries on an xml tree. The XML I am parsing looks like this: <someroot> <publication> <contributors> <person_name> <surname>Surname A</surname> </person_name> <person_name> <given_name>Given B</given_name> <surname>Surname B</surname> ...

Excel XML, how can I get Excel to display my DateTime field in yyyy-MM-dd format?

I generate an XML file through C#, and the relevent part looks like this <ss:Cell> <ss:Data ss:Type="DateTime">2009-01-18T00:00:00.000</ss:Data> </ss:Cell> However it displays in excel as a number , like 41249 that bears no resemblence to the original date. If I right click the cell, and change the format to dd/MM/yyyy or whatever...

saving and restoring xml differences

I am using asp.net and the .net framework 2.0. I may be able to upgrade the servers to 3.5 if the solution is compelling enough. Here is the problem. I have two pieces of xml. I'll refer to piece number 1 as the template and piece number 2 as the actual. Here's a basic example: template: <questions> <question1 msg="1234"> <answe...

XML Content Managment System

Hi , Just a quick question I know how I would build a cms using a database but why would you want to create a cms with xml ? What are the pros and con's using xml also if I was to build a cms with xml would I need the help of a database of does xml just remove the need of a database ? ...

Registering XML Schemas in Oracle - how to get rid of leftover objects

I tried to register a schema in Oracle the other day to validate an XML document. The code I used was fairly simple: dbms_xmlschema.registerSchema(schemaURL => 'http://www.myCompany.com/schema', schemaDoc => :schemaCLOB); At first, everything seemed to work well, as far as validation goes. I noticed thoug...

Lazy SAX XML parser with stop/resume

I am pretty sure the answer is no but of course there are cleverer guys than me! Is there a way to construct a lazy SAX based XML parser that can be stopped (e.g. raising an exception is a possible way of doing this) but also resumable ? I am looking for a possible solution for Python >= 2.6 with standard XML libraries. The "lazy" part...

Problems parsing XML using NSXMLParser

I'm having strange problems parsing (apparently) correct XML code! The xml parsed is: <?xml version="1.0" encoding="UTF-8" ?> <root> <results> <file id="0" name=" Linux Ubuntu.rar 700.64 2" size="700" disp="2"/> <file id="1" name=" [Soft] Sistema operativo Linux. ...

PHP what is the best approach to using XML? Need to create and parse XML responses

What are the recommended libraries for XML in PHP? Advantages? Looking to create/send/parse XML. Needs to support High Volume (Millions of calls per day) ...

Oracle XSL processor expanding namespaces

I am generating and validating XML and am experiencing a problem where Oracle expands the full namespace from the prefix. The source document may look like this: <pcy> <tList> <currTrn> <TXN_A>1</TXN_A> <TXN_B>2</TXN_B> ... the transform looks like this: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet v...

How can I replace the <opt> tag in XML::Simple with the original tag name?

I'm using XML::Simple to edit an XML file. After which the updated data is sent to a new XML file. But this procedure produces <opt></opt> tag to be added and the original parent tag is lost. I want to replace <opt> with the original tag name. How do I do that? ...

Using LINQ to select a random XML node

I'm new to LINQ and am having a problem. I have a file that looks something like this: <?xml version="1.0" encoding="utf-8" ?> <Galleries> <Gallery ID="10C31804CEDB42693AADD760C854ABD" Title="Test1"> <Description>The first test gallery. Picture of a cat and Wilford Brimley. Can you tell the difference?</Description> <I...

Android -- Help with XML of a "complex" row in a ListView

Hi, I have a relatively complex layout that I'd like to be the "row" of a ListView in Android and I'm having trouble getting the right-most element to show up on each row. Here's what the row should look like: There's an icon (50dip x 50dip) on the left and an icon (9 x 13) on the right. The icons should be left and right justified, r...

Partially deserialize XML to Object

I have some XML that I deserialize into a business object. I am using XmlSerializer.Deserialize to do so. However, I want one of the XmlElement contained in the XML to stay an XElement. It cannot be done directly (using an XmlElementAttribute) since XElement is not Serializable. I also tried to serialize that element to a string (in ...

problem only occuring when accessing site through VPN

This site uses JS/XML/XSLT, and it works with no errors in chrome/safari/FF/IE8/IE7, when accessed remotely, but if I access the site through a VPN, I get an error that either a document element is lacking, or the XML is not well-formed, which it is. But this only happens with IE7 - the main browser we need working unfortunately. Perhap...