xml

How do I select a particular node or element in an XML with XSLT transformations?

My XML is <row> <entry>1.</entry> <entry>foo</entry> <entry>morefoo</entry> </row> <row> <entry>2.</entry> <entry>2foo</entry> <entry>2morefoo</entry> </row> using XSLT, i'm trying to represent this information in a html table, and i want to have a Serial no. column. How do i go about selecting the value of only the first...

Java/JAXB: Unmarshall XML attributes to specific Java object attributes

There's ugly XML file that has to be unmarshalled: <?xml version="1.0" ?> <configuration> <section name="default_options"> <value name="default_port">8081</value> <value name="log_level">WARNING</value> </section> <section name="custom_options"> <value name="memory">64M</value> <value name="co...

How do you read xml data from a project resource into a dataset?

I have an xml file that is a project resource. I can access it via Properties.Resources.DrivereSettings. The xml file looks like this: <?xml version="1.0" encoding="utf-8" ?> <FilterOffsets> <FocusOffset> <SerialNumber>12543</SerialNumber> <Filter>4</Filter> <Wheel>A</Wheel> <Offset>7</Offset> </FocusOffset> </Filte...

Shredding XML Data into Tables

I have an issue where I must shred multiple xml datasets from multiple providers into a single set of tables by mapping various elements in the sources to my own tables. I can do this just fine when I am gathering the top level information, but some of my information is in a collection, such as the categories. My first step is just to ...

XML Error Validating appengine-web.xml

I get this error when I try to deploy to Google AppEngine: com.google.apphosting.utils.config.AppEngineConfigException: XML error validating /Users/matt/Documents/workspace/myapp222/war/WEB-INF/appengine-web.xml against /Users/matt/Downloads/eclipse 7/plugins/com.google.appengine.eclipse.sdkbundle.1.3.1_1.3.1.v201002101412/appengine-jav...

How can I create a general XSD complex type?

I just started using XSD today to bear with me if this a kind of a dumb question. I have an XML schema where three root elements, A, B, and C, are defined. Each of these elements may have a child of type 'example'. The 'example' type has three different attributes. While A, B, and C may only have a child of type 'example', the requirem...

Why use XML as a storage format?

Possible Duplicate: When is it OK to use an XML file to save information? What's up with everything using XML as a storage format for configuration files such? I'm asking because [name retraced] framework has an XML configuration file to store database credentials, and the particular application that's built upon the framework...

Dataset error "Table doesn't have a primary key." when using XmlRead()

I get the error "Table doesn't have a primary key." so how do I set the primary keys, does it not do this when I call ReadXml() or have a missed a arg out?? MemoryStream msXml = new MemoryStream(byteArray); DataSet dsXml = new DataSet(); dsXml.ReadXml(msXml); string s = "123456789"; DataRow foundRow = dsXml.Tables["Accounts"].Rows...

HTML5 Data Attributes for XHTML

Does anyone know how the HTML5 data attributes (data-*) can be implemented in XHTML without rendering the markup as invalid? Is there a custom namespacing hack that would allow this on existing HTML elements? ...

How to dynamically do this in code rather than XML?

I would like to define the following layout (which is currently an xml file) dynamically in my code. The end goal is to have the ability to conditionally include certain pages in my viewflipper. Thanks! <?xml version="1.0" encoding="utf-8"?> <com.gtosoft.dash.MyViewFlipper xmlns:android="http://schemas.android.com/apk/res/andro...

Need help with XML/XSL table formatting

Let's say I have a list of 500 names in XML tags. I want to display this list in a table using XSLT. In the XSLT table I want to have a maximum of three rows; I don't care how many columns I have - I plan to put the table into a scrollable div. If my list of names grows to 1,000 I still want only three rows, but the amount of columns ...

SQL Server XML: massage xml format outside of SQL or within SQL stored proc?

Hi everyone, I have read through some excellent responses already dealing with SQL XML output posts, although what I need might not be a) best to do within a stored proc and b) not possible within a stored proc. My question is this: I have a simple table; col1, col2, col3, col4 .. for the purpose of an example, they are all just varch...

Parsing a blogspot XML file with Nokogiri

I have a blogspot exported xml file and it looks something like this: <feed> <entry> <title> title </title> <content type="html"> Content </content> </entry> <entry> <title> title </title> <content type="html"> Content </content> </entry> </feed> How do I parse with Nokogiri and Xpath??? Here is what I have : #!/usr/bin/env ruby r...

Need solution for XML parsing(RSS feeds)!

I have done the coding for parsing the below shown XML code using NanoXml.But when I tried to add more tags into the XML code I am failing to do so. This is the code XML that I successfully parsed. <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <item> <title>Spain Winner Of FIFA World Cup 2010</title> ...

how to resolve these exceptions in netbeans?

http://blogs.czapski.id.au/wp-content/uploads/2010/03/02_PatientSvc_MakeHL7v2DelimDataFromCustomDelimRecords_data2.zip i have to deploy the project on given location it is build successfully but when i deploy this project it gives following exceptions and errors ERROR: Failed execution of Start: HL7Feeder_CA * Component: sun-bpel-e...

JSON or XML or other data format with jQuery ajax()?

For a data send, where the return data contains potential updates for hundreds of elements on a page, is XML or JSON or another data format better, for usage with jQuery's various parsing formats (invoked via ajax() success)? ...

Flex HTTPServices and valid xml

Hi guys, I'm currently attempting to communicate with an API using Flex as the client. I'm using Flash Builders HTTPServices to do so, bit of a noob to all this. All works correctly if the accessed XML files elements are formatted correctly however if I add a hyphen to the element name I get flex warning me to the fact ie. The returned o...

Can i use Javascript in XSL while converting an XML to another XML?

Hi, I've an XML document and I am creating another XML using XSL. I need to check some specific conditions and for that I want to use Javascript in my XSL. I tried it, however, couldn't get the desired result. I am not sure whether the Javascript will work in this XSL for checking the conditions or not. Please advise. ...

Mixed Type XSD Validation help

Hey, I've been tasked with building an XSD to validate a given xml, my issue is that some of the XML elements are of the form <ElementName description="i am an element">1234567</ElementName> I need to build the XSD that validates the Element 'value' not the attribute so with my increadibly limited experience in building XSDs (I've r...

How can I force XDocument to output "UTF-8" in the declaration line?

The following code produces this output: <?xml version="1.0" encoding="utf-16" standalone="yes"?> <customers> <customer> <firstName>Jim</firstName> <lastName>Smith</lastName> </customer> </customers> How can I get it to produce encoding="utf-8" instead of encoding="utf-16"? using System; using System.Collections.Generic; ...