xml

Creating drupal pages (nodes) automatically from other (xml) content

Hiya, I currently have a datasource from a client in the form of XML, this XML has content for all the pages that the website we're making will contain. Now after parsing and preparing all this content, does anyone know how we can then (using) PHP automate the creation of a drupal node (including all related fields for that node i.e. C...

How can I interpret an E4X property as a Date in Flex?

I've got XML that looks like this: <item> <itemDate>07/10/2009</itemDate> </item> I would like to be able to read this in as an E4X object: item.itemDate and have itemDate be an ActionScript Date object instead of a string. Is this possible? ...

How to improve the following code in PHP

Hello Here is a simple form I am using to send XML data in admin_xml.php <form name="review" action="admin_xml.php" method="post"> <textarea name="xml" cols="40" rows="10"></textarea> <input class="submit" type="submit" value="Submit Request"> </form> Here is the XML which I enter in order to retrieve the data from MySQL Databa...

Custom node names with XML serialization (.NET)

I have the following code: public class Foo {} static class Program { [XmlElement("foo")] // Ignored :( static public List<Foo> MyFoos { get; private set; } public static void Main() { MyFoos.Add(new Foo()); MyFoos.Add(new Foo()); XmlSerializer configSerializer = new XmlSerializer(type...

validating JAXB, but whitespace not ignored

some code snippets. The java coding doing the jaxb unmarshaling. pretty straightforward, copied out of tutorials online. JAXBContext jc = JAXBContext.newInstance( "xmlreadtest" ); Unmarshaller u = jc.createUnmarshaller(); // setting up for validation. SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_...

Pure Python Tidy-like application/library

Hi, I'm looking for a pure Python library which works like Tidy. Please kindly advise. Thank you. ...

dynamic ContexMenu

Hi! I have a problem. After Click MenuItem header: "System.XML.XMLElement". Can someone please tell me what I'm doing wrong? IpLisr.xml <?xml version="1.0" encoding="utf-8" ?> <IPList> <header Name="1" Click="1" Tag="1">192.168.0.100</header> <header Name="2" Click="2">192.168.0.101</header> <header Name="3" Click="3">192.168.0....

Frustration in Parsing XML or JSON with GWT

Hey everyone, For the past couple of days, I have been trying to get GWT to interpret either a JSONValue or a string of XML that gets passed back from the server (using PHP). I'm pretty frustrated, because I can't seem to get anything to work. For the XML, I have confirmed that the String passed from PHP to GWT is a correct XML string...

MSXML DOM: Add namespace declaration to an existing node in a tree

Problem description: Read an xml file, traverse to a particular node (element), if it does not have a particular namespace declaration, add the required namespace declaration, and write out the file. I need to do this in C++ using Microsoft's MSXML DOM APIs. The namespaceURI property on IXMLDOMNode COM object is read-only according to t...

Persisting complex configuration to a file (PHP)

I have a fairly large MVC PHP web app (custom, no framework) that uses a several-hundred-line XML file for configuration. The config data has a fairly complex structure, which is very elegantly represented in XML but not so easily read or written using the DOM. All reading and writing of config data goes through a Config class, which has...

(Rails) Need some javascript assistance.

Hi All, I currently have an application that calls creates and displays charts from various objects' data using JS. However, I'm having some severe issues. Can someone please explain why the following code works just fine when statically inserted into a page, but when used via rjs "page.replace_html my_div_id" it removes EVERYTHING EL...

XML deserialization 'standardising' line endings, how to stop it? (.NET)

I have a class with a property marked with [XmlText], that accepts multiline input. In my XML file, I've verified that the line endings inside the text content are infact "\r\n", the same as the rest of the file. The code I'm using to deserialize is: XmlSerializer configSerializer = new XmlSerializer(typeof(WorldList)); string file = "...

PHP cURL not returning XML

I'm trying to get character data from www.wowarmory.com using PHP and cURL. The code I have so far is: ... $browser = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070319 Firefox/2.0.0.3"; $url = "http://www.wowarmory.com/character-sheet.xml?r=Ner'zhul&amp;n=Visar"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_...

How to parse xml in ANSI or Unicode in javascript?

I'm trying to fetch and parse an XML-file through javascript. I don't control the XML-file. Now somehow the encoding of some XML-files changed, which results in the code not being able to parse the file as far as I can tell. It used to be ANSI, some are Unicode now (and those are failing). Is there a way for me to correctly get the cont...

Importing and normalising XML with Hibernate

When importing xml to a DB with Hibernate, is there a way to resolve an attribute consisting of comma-separated values to populate related table(s)? In this (somewhat obfuscated) example I have an xml file, each row of which represents a Person. The Person has a Hobbies property which contains a comma-separated list of values. The Perso...

How should I store textual data that won't change very often?

As an exercise in web design and development, I am building my website from the ground up, using PHP, MySQL, JavaScript and no frameworks. So far, I've been following a model-view-controller design. However, there is one hurdle that I am quickly approaching that I'm not sure how I'm going to solve, but I'm sure it's been addressed before...

xml validity, ajax, and php

Hello all. I'm returning some XML from PHP to Javascript via ajax and getting some 'invalid xml' errors. The xml I'm returning looks like this: <response> <song>tdb2009-01-29s2s06</song> <song>tdb2009-01-29s1s02</song> </response> And my javascript to parse it looks like: function u_handleServerR...

DMC Floss list libary.

I am trying to create a program for my wife to manage her cross stitch floss. I would like to use a library that contains all of the numbers and their associated colors however I have not been able to find a XML file to parse or library to load anywhere, free or paid. Does any craft enthusiasts know where I could get a XML or library tha...

What's better: Json or XML (PHP)

I'm manipulating few data with PHP, I have the choice between Json and XML. But I don't know what to choose, I never worked with one of them. So I want the easiest one. Also I wonder if there's good classes that can make parsing (XML or Json) easier. I focus mainly on ease of use rather than speed and scale. ...

xml parsing problem with c# linq to xml - Reference to undeclared entity

tryin to parse an xml file gives me the following error Reference to undeclared entity 'eacute' after I created a dtd file with all the entities that I found here http://www.w3.org/TR/xhtml1/dtds.html and I loaded it as follows XmlReaderSettings settings = new XmlReaderSettings(); settings.ProhibitDtd = false; string s = System.IO.Fi...