xml

Write to XML in ruby

I am completely new to Ruby. All I want is to produce a simple XML file. <?xml version="1.0" encoding="ASCII"?> <product> <name>Test</name> </product> That's it. ...

Element Declaration: Defining content as #PCDATA and one occurence of child element

In the xml spec, it says: [Definition: An element type has mixed content when elements of that type may contain character data, optionally interspersed with child elements.] In this case, the types of the child elements may be constrained, but not their order or their number of occurrences Is there any way to work around this to make t...

Tool to POST XML string to webservice for testing

Hi. We have developed a RESTful web service which expects an XML string to arrive as "parameter". For QA to test the web service, I am looking for a simple tool (With GUI preferably) which can do a POST to a URL with a XML string and show the resulting XML back. Is there a popular tool for the same? Thanks for the help in advance. Ch...

How to create a spanning tree

I have a directed graph for all kinds of available address formats in Java, which includes cycles. I want to store user Address which is a span of this graph in addition to the above template. My graph is obtained from the XML below: <address> <city start="true"> <minicity /> <street /> <square /> </city>...

Character Support Issue - How to Translate Higher ASCII Characters to Lower ASCII Characters

So I have an ASP.Net (vb.net) application. It has a textbox and the user is pasting text from Microsoft Word into it. So things like the long dash (charcode 150) are coming through as input. Other examples would be the smart quotes or accented characters. In my app I'm encoding them in xml and passing that to the database as an xml p...

XML vs Hardcoded interface?

I'm working on a flexible GUI application that can have ~12 varied layouts. These layouts are all well-defined and won't change. Each layout consists of multiple widgets that interface with a DLL using bit patterns. While the majority of the widgets are the same, the bit patterns used vary depending on the interface type being presented....

Is svcutil.exe a replacement for xsd.exe?

I am using xsd.exe to generate some c# classes from a .xsd file. I ran into the same issue that is covered here and on other sites where xsd.exe generates Type[] arrays instead of generic List collections for types in the .xsd file. Some people have suggested that svcutil.exe can be used as a replacement for xsd.exe if you pass the /dat...

What does the runtime do with XAML namespaces?

In every XAML document, there are one or more namespace declarations. ie: <Window x:Class="WindowsApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1 Height="300"> The declarations are in the form of a URL, leading me to ask: Does...

Smaller SpreadsheetML files through Excel 2007

I have a SpreadsheetML file that I am generating server-side. Such files are rather large, in contrast to Excel 2007 files, which make use of zip. So, I am wondering if there is a simple way, without use of automation, to create an a zip file with that file inside...which Excel 2007 must know how to open. I do know that Excel 2007 kno...

english dictionary API with phonetics and accents?

I'm not only a programmer, but an amateur poet, and I'd like to build some custom rhyming dictionary programs. I want to be able to specify what kinds of rhymes and follow patterns on the rhythm of words (iambic vs trochaic) as well as the sound. So, is there an API, dictionary DB essentially for english that has the spelling of words ...

Parsing XML CDATA with PHP

Hello people, I have a little problem that I can't figure out how to solve. I have an XML (actually it's RSS) file that I'm trying to parse with PHP, but the CDATA tag come out blank. Here's the XML Code and here's the PHP file Everything works fine, except that the description tag is not printing. I would be very grateful if some o...

XML documents and & char?

Hi Girls and rest, I have a question for XML document special chars, I'm using & in on of the value of the item in XML and TXMLDoc Delphi parser is complaining about it. I search for some XML parsing options but none of them concerning special chars, any ideas? Example: <Configuration> <Configuration_item> <view_...

C# XmlDocument SelectNodes

I have an xml document with a root element, two child elements, 'diagnostic' and 'results'. The 'results' element then has an arbitrary number of elements with the name 'result' When this is loaded into an XmlDocument it is easy to navigate the structure and see that this is exactly how things operate. I can write a recursive function...

Tricking Outlook into thinking my submitted infopath form is not XML - $75 USD cash bounty

I am desperate for a solution here and am willing to paypal $75USD to anyone who can provide me with either an idea or a code snippet that works. I've inherited an application that generates InfoPath forms. I'm required to add functionality so that the forms can be submitted by email whilst offline. The idea is that the forms can be fi...

How do you consume a json or xml web service in Rails or Ruby?

An external web service is sending json or xml towards my app. What would be the best way to consume this data? Is there a built-in library in Rails or Ruby to do this or do I need to use a gem for this? ...

It is possible to connect two xml's together

hi friends, I have some questions , because i am not good in XSLT... For example, I have 3 types of xml from three companies XML 1 (Company 1) file1.xml <HotelList name="Company1"> <Hotel><HotelCode>C1004</HotelCode> <HotelName>Hotel 4</HotelName> <Price>100</Price> </Hotel> <Hotel><HotelC...

jqGrid adding new row with XML Data

Hi Everyone, I am using jQGrid in my ASP.NET MVC application with add row feature. My problem is I have to save XML data in some of the row fields. But while posting the new row with some fields having plain xml, to server I get Internal server error. By default jqGrid perhaps expects json or text data to be posted on server while addin...

Alter namespace prefixing with ElementTree in Python

By default, when you call ElementTree.parse(someXMLfile) the Python ElementTree library prefixes every parsed node with it's namespace URI in Clark's Notation: {http://example.org/namespace/spec}mynode This makes accessing specific nodes by name a huge pain later in the code. I've read through the docs on ElementTree and namespa...

What does "flatdown" mean?

The OPML (outline processor markup language spec) uses the term flatdown. What does it mean? expansionState is a comma-separated list of line numbers that are expanded. The line numbers in the list tell you which headlines to expand. The order is important. For each element in the list, X, starting at the first summit, navigate flat...

Seeking a survey of community-accepted specific applications of XML

Wikipedia list -- 'business and industry' List by Doug Barry, a consultant These are about all I can find for lists of generally-accepted applications for XML. This mystifies me. I feel sure there are lots more in use or under development, and I'd think everyone would be eager to see them promoted and cross-pollinated. What got me g...