xml

Cannot get values from XML using XSLT

Hi all! I've got a question about XML and XSLT: I have this generated xml: <?xml version="1.0"?> <rootElement> <ClassSection> <Class name="Vehicle" base="Object"> <isPublic /> <isAbstract /> <Field specifier="private" fieldType="Int32" fieldName="numberOfWheels" /> <Field specifier="private" fieldType="In...

Export XML to local file using JavaScript

I have a Windows 7 Gadget that runs JavaScript locally. It sends arguments to a Perl script on the server that returns XML. The XML is just timestamps and raw data. I graph these results into a time series using Flot. The graphs are usually performance data (%CPU utilization, logical disk space, etc.) and I want to have the option to exp...

Webview not working?

Hey Guys, I've got the following method... public class Image extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.menu); /* Using WebView to display the full-screen image */ WebView full = (WebView)findViewById(R.id.webview); /* Set up the Zoom cont...

C# Foreach XML node

I'm trying to add all the nodes in an XML file into a listView, and I'm doing something wrong but I can't for the life of me figure it out even after looking at a load of examples. This is the XML snippet: <queue> <slots> <slot> <status>Downloading</status> <filename>file1</filename> <size>1 GB</size> </slot> <slot> <status>Downloading<...

How can I insert the greater- and less-than characters into an XML file modified by WiX during install?

I'm using WiX to author a Windows Installation database for my application. I've got an XML file that is installed along with my app, which needs to be filled with information obtained during installation. The WiXUtilExtension tags util:XmlFile and util:XmlConfig are great ways to do this, in principle, but they don't quite solve my prob...

How can I validate the XML document in a SAXParser without having to use an XMLReader?

I want to create a SAXParser which validates, but it seems the only way is either to create an XMLReader and use setErrorHandler() or let the ContentHandler in SAXParser.parse() also implement ErrorHandler. Am I missing something? All I want to do is create a validating SAXParser like this: private SAXParser createParser(final boolean ...

Using MovieClipLoader to preload images, but not use them yet

Hello, I'm loading images, whose location are specified in an XML document, using Actionscript-2's MovieClipLoader. I want to place these images in (nested) container movieclips that are placed further down the timeline. The problem is, these container instances cannot be referenced as long as the playhead didn't reach their keyframe. I...

xsl merge elements and sort by date.

I have the following xml <Values> <New> <value>110</value> <date>2009-10-15</date> </New> <Previous> <value>100</value> <date>2010-10-15</date> </Previous> <Previous> <value>130</value> <date>2008-10-15</date> </Previous> </Values> I am using the following xsl <xsl:variable name="mergedData"> ...

another question about line break in UILabel

Hi everyone, I'm struggling with line break in UILabel. I'm generating xml in vb.net and then parse it in iPhone application. xml contains text which initially contains html tags such as , so I can and need to replace these tags with something to add a linebreak in iphone How can I do it? I tried \n , \n\r, they a not working Any help ...

ALSB: How to turn off XML validation for incoming messages?

Hello! Having an ALSB application with a link from another internal application, is it possible to turn XML validation on that link off? I'm looking to ways to improve performance, and the validation of messages from a well-tested application certainly feels like unnecessary. ...

Selecting a child text node amongst white space text nodes, in a complex XML element using XPath

Hello, I've been racking my brain over this but can't seem to get it right, and I'm not hitting the correct keywords on Google.. I've recently started to play around with XSLT and XPath to create an XML description of natural language glossaries – for a project of mine. The problem is that I have chosen to use 'mixed content' compl...

Translate PHP PUT HTTP request to ColdFusion

What would this code look like in ColdFusion? protected function httpPut($url, $params = null, $data = null) { $fh = fopen('php://memory', 'rw'); fwrite($fh, $data); rewind($fh); $ch = curl_init($url); $this->addOAuthHeaders($ch, $url, $params['oauth']); curl_setopt($ch, CURLOPT_PUT, 1); cu...

In XSL, how do I select a value, based on multiple attributes?

This has got to be a very basic question, but I'm really struggling with a solution. From the following XML, I'm trying to extract the first instance only, when I have a match on the tag="099" and the code="a" attributes in a marc:datafield node, and a marc:subfield node, respectively <?xml version="1.0" encoding="UTF-8" ?> <marc:colle...

Python and ElementTree: return "inner XML" excluding parent element

In Python 2.6 using ElementTree, what's a good way to fetch the XML (as a string) inside a particular element, like what you can do in HTML and javascript with innerHTML? Here's a simplified sample of the XML node I am starting with: <label attr="foo" attr2="bar">This is some text <a href="foo.htm">and a link</a> in embedded HTML</lab...

XPath select node with periods

I have an XML document where some of the nodes have a . in their name. <com.site.blah> <id>asdkjasd</id> <com.site.testing> <name>test</name> </com.site.testing> </com.site.blah> If I do @doc.search("/*/id").first.xpath it returns /com.site.blah/id, but if I then do: @doc.search("/com.site.blah/id").first.inspect it r...

XML file validation using PHP

I am using DOMDocument for xml file validation. It takes more than 30 minutes in validating a 67MB xml file. Is there any other way to improve this checking time? ...

DOM4J/XPATH Parsing of document

Node existingUserNode = loginDoc.selectSingleNode("/returningUser"); String username = existingUserNode.selectSingleNode("/username").getText(); String password = existingUserNode.selectSingleNode("/password").getText(); for <?xml version="1.0" encoding="UTF-8"?><returningUser><username>user</username><password>password</password></r...

python,python-elements and orphan element

Hi, i have a little problem. I must parse an xml file. I use the module "element" : http://code.google.com/p/python-elements/ Sometimes in the XML, an element is orphan but sometimes not : <product /> .... <product>7</product> I created a class Products with product as children : class Products(Elements): _tag = "products" _ch...

Why does XamlReader throw when I use a ParserContext?

This works: XamlReader.Parse("<Pig xmlns=\"clr-namespace:Farm;assembly=Farm\"/>"); This throws The tag 'Pig' does not exist in XML namespace 'clr-namespace:Farm;assembly=Farm': var context = new ParserContext(); context.XmlnsDictionary.Add("", "clr-namespace:Farm;assembly=Farm"); XamlReader.Parse("<Pig/>", context); Why? Farm is t...

How can one disable the XML editor in Eclipse for .xsd and related files?

I want to be able to double-click on an .xsd and have Eclipse open it in a text editor, but if I add a ".xsd" file association it shows up with the XML Editor as the first editor in the list and it says "(locked by 'XML (Illformed)' content type) (locked by 'XSD' content type)" etc., and under the Content Types panel the section for XML ...