xml

looking for Java GUI components / ideas for syntax highlighting

I'm not committed to any particular GUI tookit or anything - just needs to be Java based. I want to do simple syntax highlighting ( XML and XQuery ) inside editable text areas. My only candidate so far is Swing's JTextPane, as it supports seems to support the styling of text, but I have no idea how to implement it in this context. If a...

Parse Fast Infoset documents in PHP?

Is there a library which allows PHP to decode application/fastinfoset binary XML? ...

Is there a free/pay web service that I can query to get MLS data?

Given an MLS#, I'd like to get an XML document with details about the listing, like address, price and such. Not a NAR or CREA member. Mostly interested in North American rental property listing data. ...

How can one close html tags in vim quickly

It's been a while since I've had to do any html-like code in vim, but recently I came across this again. Say I'm doing a simple bit of a html page: <html><head><title>This is a title</title></head></html> How do I write those closing tags for title, head and html down quickly? I feel like I'm missing some really simple way here that d...

How can I provide customer error messages using JAXP DocumentBuilder?

I want to provide my own message from the validation done in DocumentBuilder, rather than the one from XMLMessages.properties. Now i see that a property error-reporter needs to be set to a class which extends XMLErrorReporter. However, I've not been able to get ComponentManager from Document/Builder/Factory. Can any kind soul gimme co...

What are the benefits of dependency injection containers?

I understand benefits of dependency injection itself. Let's take Spring for instance. I also understand benefits of other Spring featureslike AOP, helpers of different kinds, etc. I'm just wondering, what are the benefits of XML configuration such as: <bean id="Mary" class="foo.bar.Female"> <property name="age" value="23"/> </bean> <b...

What to use for XML parsing / reading in PHP4

Unfortunatly I have to work in a older web application on a PHP4 server; It now needs to parse a lot of XML for calling webservices (custom protocol, no SOAP/REST); Under PHP5 I would use SimpleXML but that isn't available; There is Dom XML in PHP4, but it isn't default any more in PHP5. What are the other options? I'm looking for a so...

maximum size for xml files

whats your rule of thumb for maximum size for xml files ...

Java utility to validate string against NMTOKEN

I have some application code which generates XML documents, which are then validated against an XML Schema. The schema makes use of NMTOKEN types, and occasionally, the generated XML contains string values which are illegal NMTOKENs (e.g. they contain spaces or weird punctuation). The Xerces schema validation catches it OK, of course, b...

What's the difference between an element and a node in XML?

I'm working in Java with XML and I'm wondering; what's the difference between an element and a node? ...

What is the best way to generate XML Binding Code from a DTD?

Most Java-XML binding frameworks and code generators need XML Schema Defintions. Can you suggest the best way to generate binding code from DTD. I know that the XJC in JAXB 2 supports DTD but it is considered experimental. In the spirit of Stack Overflow, one suggestion per answer please - to be voted up or down instead of duplicated ...

Best way to bind a web UI against XML attributes?

I want to bind my UI against a collection of XElements and their properties on a webpage. Hypothetically, this could be for any object that represents an XML tree. I'm hoping that there might be a better way of doing this. Should I use an XPath query to get out the elements of the collection and the attribute values of each (in this c...

How do you identify duplicate elements in an XPath 2.0 sequence ?

I have an XPath expression which provides me a sequence of values like the one below: 1 2 2 3 4 5 5 6 7 It is easy to convert this to a set of unique values "1 2 3 4 5 6 7" using the distinct-values function. However, what I want to extract is the list of duplicate values = "2 5". I can't think of an easy way to do this. Can anyone hel...

How do I deserialize an XML file into a class with a read only property?

I've got a class that I'm using as a settings class that is serialized into an XML file that administrators can then edit to change settings in the application. (The settings are a little more complex than the App.config allows for.) I'm using the XmlSerializer class to deserialize the XML file, and I want it to be able to set the prop...

Parsing XML With Single Quotes?

I am currently running into a problem where an element is coming back from my xml file with a single quote in it. This is causing xml_parse to break it up into multiple chunks, example: Get Wired, You're Hired! Is then enterpreted as 'Get Wired, You' being one object, the single quote being a second, and 're Hired!' as a third. What I w...

XML for Documentation - Standards?

I need to create Documentation for a tool (Manually written User Documentation, no Developer/API Documentation from the Source Files). Now, there are about a billion different ways to do it, but I have the following requirements: Needs to be a physical file, so that it can go to SVN Needs to be printable Needs to be readable and search...

diff and merge of XML

Can anyone recommend a good XML diff and merge tool? ...

Generating an Xml Serialization assembly as part of my build.

This code produces a FileNotFoundException, but ultimately runs without issue: void ReadXml() { XmlSerializer serializer = new XmlSerializer(typeof(MyClass)); //... } Here is the exception: A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll Additional information: Could not load fil...

Is there a difference between 'valid xml' and 'well formed xml'?

I wasnt aware of a difference, but a coworker says there is, although he can't back it up. What's the difference if any? ...

What is the best way to return XML from a controller's action in ASP.NET MVC?

What is the best way to return XML from a controller's action in ASP.NET MVC? There is a nice way to return JSON, but not for XML. Do I really need to route the XML through a View, or should I do the not-best-practice way of Response.Write-ing it? ...