xml

jQuery and AJAX

Can anyone help with a jQuery snippet that would use Ajax to pull an XML file in on page load? Have really clunky way of doing it without jQuery here: <script type="text/javascript"> function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else ...

Get Eclipse to recognize the maps api

Hi I'm developing an Android app and trying to incorporate maps into one of my sub-activities. Having followed all of the instructions from Android, my java file will not recognize the "MapActivity" or the import statements to include the needed api. Here is my XML manifest and my class file. <?xml version="1.0" encoding="utf-8"?> ...

Read / Write XML file from Java application bundle

Hi there! I've got an XML file that is parsed and written in my application. From within my IDE (Eclipse) I simply address it like this: Reading: private String xmlFile = "file.xml"; and then I build the document: doc = sax.build(xmlFile); Writing is done like this: writer = new FileWriter("file.xml"); Runs great so far, but a...

Problem merging similar XML files with XSL

I have two documents that I need to merge, that happen in a way that I don't seem to be able to find covered in other examples. Namely, that it needs to match not only on a node's attribute at one level, but also on the value of an attribute a node level below that, to get that node's value. I'm trying to take this sample: <?xml vers...

Writing XSD schema: if one field contains "A", then other field should not contain "B". How???

A simple scenario: if one field contains "A", then the other field should not contain "B". How to write a XSD schema for it. Example: <root> <field_1>A</field_1> <field_2>B</field_2> </root> How to write an XSD schema that imposes restriction on the value of an element, depending on the value of another element? ...

Need help with a Linq XML conditional grouping query

I have the following xml fragment: <BANNER ID="Banner 2" ROW_WIDTH="200"> <BANNER_TEXTS ID="BANNER_TEXTS"> <BANNER_TEXT UNDERLINE="false" SPAN_COL="1" WIDTHT="78px"></BANNER_TEXT> <BANNER_TEXT UNDERLINE="true" SPAN_COL="3" WIDTHT="234px">Years In Practice</BANNER_TEXT> <BANNER_TEXT UNDERLINE="true" SPAN_COL="3" WIDTHT...

JOpenDocument: Adding style to a paragraph

I'm new to JOpenDocument and the documentation is somewhat lacking. I know there has to be a way to assign a paragraph a style so that it can be bold, and things of that nature, but I can't figure out how. Here is my code, does anyone have any ideas? File outFile = new File("c:\\out.odt"); ODPackage p = new ODPac...

Handling duplicate nodes in XML

Scenario: I am parsing values from an XML file using C# and have the following method: private static string GetXMLNodeValue(XmlNode basenode, string strNodePath) { if (basenode.SelectSingleNode(strNodePath) != null) return (basenode.SelectSingleNode(strNodePath).InnerText); else return S...

converting into XML

I am trying to convert a conversation I downloaded from Wikipedia into XML. I used the special export to get the page in XML format... that works great until I get to the main conversation. <conversation> {{PersonA|Cheese}} {{PersonB|I like it too...}} {{PersonA|Cheese?}} </conversation> Thats not the real conversation... ...

Serialize into an XML Fragment - not XML Document

How do I serialize an XML-serializable object to an XML fragment (no XML declaration nor namespace references in the root element)? ...

Simple XML parsing error

I'm trying to iterate through a Twitter XML File, where the container tag is <users>, and each user is <user>. I need to create a variable $id based on the XML attribute <id> for each user. Username is already instantiated. $url = "http://api.twitter.com/1/statuses/friends/$username.xml"; $xmlpure = file_get_contents($url); $listxml =...

Base64 en/decoding between xstream and iPhone SDK

I am passing a byte array from a java server to an iPad client in XML. The server is using xstream to convert the byte array to XML with the EncodedByteArrayConverter, which should convert the array to Base 64. Using xstream, I can decode the xml back to the proper byte array in a java client, but in the iPad client, I'm getting an inv...

The type initializer for "projData.projDataModule" threw an exception.

In visual basic, when in the "frmMain Events: Load", I get the following error The type initializer for 'projData.projDataModule' threw an exception. when running the code: var = 180 "var" is defined in projDataModule as Module projDataModule Public var As Double End Module When I rebuild the solution, It says "0 errors, 0 ...

What is your favorite way to read XML files?

Let's take this xml structure as example: <?xml version="1.0" encoding="utf-8"?> <Configuration-content> <XFile Name="file name 1" /> <XFile Name="name2" /> <XFile Name="name3" /> <XFile Name="name4" /> </Configuration-content> C# interface to implement: public class Configuration { public XFile[] Files { get; set; } } p...

How can I convert XML files to one CSV file in C#?

I have a collection of strings that are XML content. I want to iterate thru my collection and build a CSV file to stream to the user for download (sometimes it can be hundreds in the collection). This is my loop: foreach (string response in items.Responses) { string xmlResponse = response; //BUILD CSV HERE } This is what my X...

Can't seem to load a webview from xml, why?

Well, I'm trying to follow the tutorial from http://rapidandroid.org/wiki/Graphing. But I found a problem just in the first part of it. I'll describe the problem here, I just cannot understand how this could be wrong, it's pretty simple stuff. What am I doing wrong here? First I created a xml file called statistics.xml, in it among oth...

Programatically upload XML file to SSRS server

Hi all, How do I programatically upload an XSLT file to an SSRS server database? I would like exactly the same functionality as the 'Upload File', preferably using the 'rs' command. I have tried rs.CreateResource, but it doesn't seem to work for XML/XSLT files (though it works for Excel and image files) I understand that manipulating...

Using SQLXML Bulk Load in .NET Environment - Error with One to Many relationship on Complex Type

Hi, I have an error when I am importing an XML file using SQLXMLBulkLoad, wondering if anyone could help. Error: Data mapping to column 'Attribute' was already found in the data. Make sure that no two schema definitions map to the same column Full files and details can be found here http://www.experts-exchange.com/Microsoft/Development/...

Representing C#3 code as an Abstract Syntax Tree in XML

I was wondering if there is something similar to GCC_XML for C#3; basically a way to represent a program's entire syntactic structure in XML. Once the representation is created, I was hoping to parse it into an XDocument and interpret or query it from there. Are there tools out there for this? ...

What is the correct method to load an XML file and re-write it as a CSV?

Updated to be clear. Step One: I have a XML file that I want to load into a DatGridView. (Mostly working thanks to Max, but I still have a problem with the XML rollup) Step Two: Run some code based on user input -- (not part of this solution) Step Three: Export the DataGridView into a CSV File. (Solved by Max! Thanks Man That was...