xml

JAXBContext and Marshaller change the order of XML namespace

I have a code line like this : StringWriter writer = new StringWriter(); JAXBContext jc = JAXBContext.newInstance(namespace); Marshaller marshaller = jc.createMarshaller(); marshaller.marshal(input, writer); When namespace = "nfpa:nfpares". I have a generated content like this : <?xml version="1.0" encoding="UTF-8" standal...

How can I render HTML from XML within an iframe?

I am making a REST call that returns XML from within a Widget in Zendesk using an <iframe/>. I would like to use XSLT to transform the XML into HTML that is rendered within the <iframe/> Is there any way I can write my XSLT inline, and have the <iframe/> somehow execute the xslt transformation, yielding the HTML to show in the <iframe/...

Rails 3 rendering XML

I have Rails 3 application (running Rails RC1), and I have the following controller: class PluginsController < ApplicationController respond_to :html, :xml, :json def index @plugins = Plugin.all respond_with(@plugins) end end If I try to render http://localhost:3000/plugins it works fine, showing me the HTML version. If...

xsl:sort an XML file using multiple elements

Hi All, I'm trying to sort a bunch of records in an XML file. The trick is that I need to sort using different elements for different nodes. To give a simplest example, I want to do this: given an xml file <?xml version="1.0" encoding="utf-8" ?> <buddies> <person> <nick>Jim</nick> <last>Zulkin</last> </person> <person> <first>Joe...

Official XHTML 1.1 DTDs vs. official XHTML 1.1 XML Schemas

I have the option of validating XHTML 1.1 documents against the official XHTML 1.1 DTDs (I use the plural because the "main" DTD actually includes several others) or against the official XHTML 1.1 XML Schemas. Now I know that the XML Schema language is more expressive and powerful and can therefore check for more things. What I'm wonder...

XPath Subset Selection

I have the following XML (which is actually HTML): <html> <h4>something</h4> <p>a</p> <p>b</p> <h4>otherthing</h4> <p>c</p> </html> Can a XPath selects the "p" nodes that are following siblings of the first "h4" node but not following siblings of second "h4" node (selecting "p" node a & b only)? ...

Pulling xml data in Flash with a button

I have been failing to do a thing with Flash actionscript2.0; Here is the problem- My xml file name is: sea.xml On my fla file, there is a button named: do; and a movieClip named: loader; What I am trying to do is- load xml only when the button is pressed. So I tried this- myXML:XML = new XML; do.onRelease = function(){ myXML.load("s...

C# Pattern Matching XML Element Value Libraries / Functions

I am new to C# and am kind of confused what to do after reading some related posts about this topic. I am giving an XML file from another tool. The XML file may not be valid as it may contain illegal characters and could be not well-formed. Unfortunately, the correction of illegal characters won't be done as the XML is generated from ...

Best/most portable way to version a file format

Hello SO, This question concerns XML schemas and files. Suppose I am developing a desktop application with a file-based interface, i.e. the user stores their progress in a file on disk - pretty standard for the vast majority of productivity applications and many more besides. The file is fundamentally XML, whose schema is stored by som...

Boost serialization compiling issue

Hi, I am using boost serialization on windows, and I wanted to test my code on linux (ubuntu) and unfortunately it does not compile. #include <string> #include <fstream> #include <boost/archive/xml_iarchive.hpp> #include <boost/archive/xml_oarchive.hpp> #include <boost/serialization/string.hpp> #include <boost/serialization/nvp.hpp>...

In C, would XML be a good format to use internally for a RPG engine?

I am a novice C coder who would like to write a role playing game resolution library. What I mean by this is that this program would only deal with resolving those conflicts which is piped into it. For example, when informed that Captain Amazing uses his Blasto eye beams at medium distance with his d8 Shooting Skill costing 3 Power Poi...

How to do opposite of of preference attribute android:dependency?

Is there XML attribute that does the exact opposite of android:dependency? What I would like the dependent preference to be enabled when the other is NOT checked and disabled when it IS checked. edit: maybe the issue isn't with android:dependency maybe there is an xml attribute that I can add to make the default for that preference di...

xsl transformation of arbitrary list structure

I'm trying to transform the content of a chm (microsoftcompiled html help) file's index which holds structure information in very arbitrary HTML lists with xsl (see the first code snippet-the actual index file's structure is a bit different, but the important parts are there). I've checked out the index of several chm files but the ul / ...

Delphi Open save to XML using Microsoft.Jet.OLEDB.4.0 (.mdb)

I have a application with working in access (.mdb) my connection is made using Microsoft.Jet.OLEDB.4.0 and i nead to export a MasterTable and detailtables (1,2,3) to XML is it possible? If it´s possible can i somewhere else (send by email) Open and update or insert into the database? the tables are the same only we are somewhere where i...

How to remove elements from XML using Python

Hi, I got stuck with XML and Python. The task is simple but I couldn't resolve it so far and spent on that long time. I came here for an advice how to solve it with couple of lines. Thanks for any help with traversing the tree. I always ended up with too many or too few elements. Elements can be nested without limit. Given example is ju...

How do I refer to another property in a jnlp?

<property name="netbeans.user" value="${user.home}/.foo"/> <property name="derby.system.home" value="netbeans.user"> I want derby.system.home property to be the same as the above one. How do I achieve that other than by expliciting the same CDATA (so by value)? I guess what I'm asking is: how can I let the value of an element ...

Is there a Javascript template system that wraps HTML?

I wonder if there are anything like a Javascript template system that wraps HTML, so that we don't have to deal with HTML directly (yeah, i know it's a bad idea, but just out of curiosity). So instead of writing HTML: <body> <div id="title">Great work!</div> <span>My name is Peter</span> </body> We write in Json: body: [ {div:...

What's stopping me from using arbitrary tags in HTML?

Even the new HTML5 tags aren't enough to describe structures without falling back to divs. What's stopping me from changing: <div class="post"> <div class="userinfo"> <span class="name">Casey</span> <img class="avatar" src="..." /> </div> <div class="body"> <p>blah blah blah</p> <p>blah blah b...

Anyone has sample code to load an xml using OMNIXML

I am looking for some actual working sample code to read an XML using the plain OmniXml (or OmniXmlUtils) unit. I don't want to use the TOmniXMLWriter class , as explained elsewhere , but want to load an xml file using plain Delphi code. I searched the OmniXml site but the samples there are as good as non-existing. Thanks in advance. ...

What exactly is character data?

I was reading up about DOM and I saw this function DOMCharacterData::appendData. It appends the string data to the character data. So in layman's terms, what is character data? ...