xml

Why is it possible to change an XML document's namespace by setting the xmnls attribute in Java 5 but not in Java 6?

We have an XSD which validates an XML document with a namespace declared, but we would like to use it on a document without one. In Java 5, it looks like it's possible to call setAttribute() on the xmlns attribute of the root element, but this fails in Java 6 with an exception: Exception in thread "main" org.xml.sax.SAXParseException:...

jquery, XML to HTML

Hi all, I have a question , about parsing xml. I want to get some xml data to HTML, but I have a problem, I can get this data just from local xml, when I try to get data from external URL it doesn't work, for example from http://www.w3schools.com/XML/plant_catalog.xml This is jquery: <script type="text/javascript"> $(docum...

Translate Spring XML configuration to Java config

I'd like to use Spring with Java configuration, but almost all examples are writte in XML and I don't know how to translate them to Java. Look at these examples from Spring Security 3: <http auto-config='true'> <intercept-url pattern="/**" access="ROLE_USER" /> </http> <authentication-manager> <authentication-provider> ...

XML-schema/validation: different separator for datatype double

hey, I changed the datatype of some parameters within my xsd file from string to their real type, in this case double. now I'm facing the problem that around here the comma is used as a separator and not the point as defined by the w3 (http://www.w3.org/TR/xmlschema-2/#double) causing erros all over during deserialization (C#, VS2008). ...

Cocoa/Objective-C : Best Practice to parse XML Document?

I never worked with XML in Cocoa before so I have no idea where to begin. Right now I need to parse a XML File (from Hard disc) into an object or even an Array of objects. My XML looks like this <Person> <FirstName> <LastName> etc... </Person> <Person> ... In my project I already have a Person class with a required propertie...

What has an namespace to do with XML?

Something confuses me here: The NSXMLParser method has a namespaceURI attribute: - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName From the documentation I couldn't figure out what they mean by "namespace". Can someone explain with ...

XmlNode.SelectSingleNode returns element outside current ?

Hi, my problem is like this.Let's say i have xml like this <roor> <child Name = "child1"> <element1>Value1</element1> <element2>Value2</element2> </child> <child Name = "child2"> <element1>Value1</element1> <element2>Value2</element2> <element3>Value3</element3> </child> </root> I have a method that gets as parameter...

XML Password Obfuscation

Is there a way to obfuscate part of an XML attribute? I want to encrypt the user= and password= part of the following xml attribute so no one looking at the file can see the password. Is there any way to do that using Java DOM? <connectionString="Data Source=Winserver\sqlexpress;Initial Catalog=haven;Integrated Security=false;user=adm...

Converting HTML table data to CSV and XML

Hi, I'm building a table script and one of the functionalities is to convert XML, CSV data to HTML and vice-versa. I found some similar scripts on the web, that converts CSV to HTML and vice-versa but didn't find for XML. I'm writing the script from scratch, but I thought I'd better read few scripts before I write my own, to avoid mis...

XmlWriterSettings have no effect on XmlWriter created from XmlDocument

I need to use ISO Latin 1 encoding, but using the code below the writer settings defaults back to UTF8. What am I missing here? XmlDocument xmlDoc = new XmlDocument(); XmlWriterSettings settings = new XmlWriterSettings(); settings.ConformanceLevel = ConformanceLevel.Auto; settings.Encoding = System.Text.Encoding.GetEncoding(28591); usi...

Can anyone help me scrape the Amazon Products API using Ruby?

Hi, I'm using the amazon-product-advertising-api gem and am following the example code to try and grab music album data. The code I have is as follows: post '/mash' do username = params[:username] user = Scrobbler::User.new(username) @recommendations = user.recommendations @urls = { } @recommendations.each do |t...

Implementing Find-Or-Create During Core Data Flat File Import

I am importing a large plist/XML into Core Data. The structure is simple: let's say there is Person and Company, and a Company can have many Persons. The import goes successfully, but the plist has no established relations, so duplicates of Company are inserted every time multiple people have the same Company. A potential solution lies ...

How to convert XML element data into PHP numeric array

I'm not really a web developer and I'm trying to make a web interface for parsing and displaying experimental data, so I apologize if this is a ridiculously easy solution. I'm trying to take data from an XML element and convert it into a PHP numerical array that I can plot using GD. So far, I have the XML creation, XML loading, and GD ...

Integer values updated by XML

How do I remake my swf for xml commands? "Remake" sounds silly, but I just want to have integer values updated by an XML file. This may be beyond my understanding. I'd like an example, a mash-up, or method I can work from. myThoughts - It needs to read XML "parse it etc" - variables receive e:data instead "my struggle with passing value...

Writing XML strips trailing spaces

I am trying to write an XML file using MSXML4. It works fine except when I have a data element with a trailing space which must be preserved. Given the following code to insert a new element: const _bstr_t k_Parent (ToBSTR("ParentNode")); const _bstr_t k_Child (ToBSTR("ChildNode")); const _bstr_t k_Data (ToBSTR("Data...

Capturing mixed content in XML using a SAX Parser

Is a SAX Parser capable of capturing mixed content within an XML document (see example below)? <element>here is some <b>mixed content</b></element> ...

YAML/JSON/XML which one to choice on IPhone for communication over RESTFul protocol?

I'm writing as simple application that comunicate with an external server. The server currently support yaml, xml and json. Which encoding is fastest on IPhone? Which has better support? What libraries do you suggest? ...

Dynamic Sprites as3

I just cant figure out how to do this. Im not very familiar with as3 and it just keeps trowing errors at my face. One thing that bugs me most is not having a clue on what or when I need to import stuff. Im using flash builder and Im simply trying to make it grab grab an image from a xml file and place it on screen with the possibility t...

What should a developer know before creating a new XML based format or language?

Let's say you have to write an xml-based (no choice) language that will be some kind of "standard" format in the end, used by billions of applications around the world, or at least you hope for it. That language will be like html for internet, but in another specific domain. Something really simple and descriptive, that will be interpret...

Reading an XML File and Selecting Nodes in .NET

I have a heavier XML file with lots and lots of tree nodes. I need to pick-up some particular node (for example say Diet), under which there are multiple sections. ie. Diet node occurs randomly in the XML, so i need to find the node as Diet and get its child elements and save it to DB. Assume that Diet is not only one line, it has 10-1...