xml

Strip off XMLDSIG elements from incoming XML POST to WCF RESTful Service

Folks, I am building a RESTful service that is secured by providing an XMLDSIG XML signature at the bottom of the XML document. When I send this document to the server, the WCF service is doing the XML de-serialization method on the HTTP payload to give me a C# class. Unfortunately for this de-serialization to occur properly, the C# cl...

Java/XML problem

Hello all, I'm having an issue generating XML via Java code. I have a class that for SailingAvailabilityResponseMessage. Within this class there are several other classes that are also used in the method I'm writing. Here is a snippet of what the SailingAvailabilityResponseMessage classes looks like: import javax.xml.bind.annotation...

XML variable tag names

I have been tasked with writing an xsd, for an xml file format that my company has created. Unfortunately one of the tags contains two variables, here is an example of the tag <to_1.1.1.0_24> The 1.1.1.0 is an ip address and as such can change, and the 24 is the netmask. Is there anyway of expressing this within an xsd document. Ma...

XML Serialization of an Interface

Hi All, I have a problem that I'm working in nHibernate project that have the following object: [Serializable] public class Prototype { public virtual long Id { get; private set; } public virtual string Name { get; set; } public virtual IList<AttributeGroup> AttributeGroups { get; private set; } } and I have created a ...

asp.Net ListView/GridView Databound Error

I am attempting to use a GridView in asp using VB and I get an error message about content. I did some research and reformatted the XML document the datasource is referencing but still cant seem to get the GridView to generate. Error Message: "The data source for GridView with id 'GridView1' did not have any properties or attributes fr...

Java generated XML showing up with special characters in .Net/SQL

We have a java desktop application that uses JAXB to generate an XML file which is then read by a .Net application and stored in a SQL server database. We're finding that carriage returns in Java and not coming over as carriage return/line feeds in .Net/SQL. Is there a way to tell Java or Jaxb to include both the carriage return and li...

How do I translate JSON and XML between each other?

Hey, I have a quiz really soon, and part of it is translating between JSON and XML. How do I do this? ...

How to escape double quotes in XML attributes values?

From the following trials <tag attr="\""> <tag attr="<![CDATA["]]>"> <tag attr='"'> Only the last one works for a XML parser that I'm using here. Is there any other alternative? ...

Alphanumeric sort on mixed string value revisited

Note that I posed a very similar question earlier but the requirements have since changed http://stackoverflow.com/questions/3842719/alphanumeric-sort-on-mixed-string-value The primary difference in the requirements now is that the source XML can include forms with all alpha chars in the form_name or all integers. The form_name can be...

How do I create an XML file including a PHP-array-informations

I have a php-array, and I need to include the informations in an XML-file. I have tried this: The array: $files[] = array( "filename"=>$file, "intLatitude"=>$intLatitude, "intLongitude"=>$intLongitude); } I have tried with this: $file = fopen("results999.xml","w"); $x...

How can I wrap a group of adjacent elements using XSLT?

I have some XML with <ListItem> elements, and I'd like to wrap any consecutive runs with <List> elements. So, source XML would look something like this: <Section> <Head>Heading</Head> <Para>Blah</Para> <ListItem>item 1</ListItem> <ListItem>item 2</ListItem> <ListItem>item 3</ListItem> <ListItem>item 4</ListItem> <Para>Some...

How to use generic object List in JAXB XmlAdapter

I have two similar classes, that simply have a string name. I wanted to add an XML adapter to the Lists so that I could get a CSV string from each of them. I tried to declare my adapter like so: public class ListXmlAdapter extends XmlAdapter<String, ArrayList<Object>> { But when I try to use this I get illegal annotation exceptions ...

Handling different XML response documents with one SAX Handler

Hello, I am developing a Java application that makes an HTTP Request to a web service, and XML is returned. If the response code is 200, then a requestSucceeded() callback method will send the XML to a SAXParser with a different SAX Handler, depending on what web service is being called. If the response code is not 200, then a requestFa...

What is the easiest way to extract plain text from an xml document?

I have some ebooks in xml format. The books' pages are marked using processing instructions(e.g. <?pg 01?>). I need to extract the content of the book in plain text, one page at a time and save each page as a text file. What's the best way of doing this? ...

SQL Server FOR XML PATH nesting issue

I am trying to convert a query to return as xml in the correct format The query is simply SELECT * FROM [TABLENAME], and yes it has to be * as this is used for a dynamic utility that needs to work on any table. Anyhow, I want the resulting records to be nested two levels deep like this <Root> <RecordParent> <Record> ...

Using compound XPath Predicates to search XML message

I'm having trouble figuring out how to select data using a compound XPath query so that I can essentially find the 5th column of row in my data. Here is my example XML: <sample> <OBX> <field position="1">1</field> <field position="2">My Value</field> </OBX> <OBX> <field position="1">2</field> <field position="2">My other...

What is the difference between <xsl:apply-templates /> and <xsl:apply-templates select="." />

What is the difference between <xsl:apply-templates /> and <xsl:apply-templates select="." />. I thought that the select="." was not necessary, but I am getting different results depending on which I use. Sorry if this is a repeat. I have tried searching this issue but could not find anything. ...

How to get required XML element from not well formed XML data in SQL server

Hello, In my SQL 2008 database table, I have one column name AUTHOR that contains XML data. The XML is not well formed and has data like below <Author> <ID>172-32-1176</ID> <LastName>White</LastName> <FirstName>Johnson</FirstName> <Address> <Street>10932 Bigge Rd.</Street> <City>Menlo Park</City> <State>CA</State> </Address> </Author> ...

From HTML Form to XML Tree

I would like to pick some of your brains on this matter... I've got a large form where there are a lot of multiple selection choices. Some are radio groups and yet others are "select all that apply" checkbox groups. I'm trying to figure out the best way to translate each of these selections within my XML tree to send to the SQL server....

Is there a way to get XML results from MySql 5.1 ?

I need to select a single row from MySql and get the results as well-formed XML, where the XML tags are the column names. Is there some built-in way to do this, or will I need to manually assemble the XML? I want something like this: < id >2< /id > < name >John Smith< /name > < age >34< /age > Just to clarify and elaborate... ...