xml

XSLT copy with modifications

Hi I'm stuck trying to work within these constraints, I'm using XSLT 1.0 {under .net}. I'd like to be able to do the following: i'm xsl:for-each'ing through a set of nodes of type <node> <data> unknown unstructured xml </data> <owner></owner> </node> i'd like to be able to output <node> <data> unknown unst...

Android string.xml error for every character I type

I am going through the android hello world tutorial, and have been stuck when trying to create an XML UI. For some reason, even on a new program, in which I have made no changes to the default build, it gives the error java.lang.NullPointerException after every character I type. I can't figure out why it is doing this, as I am just try...

Why use HTML markup in languages like ruby, php, asp.net mvc instead of XLST to convert XML to HTML?

I just learned about XLST on stackoverflow today (I love how in computers you can program for years and constantly have 'darn, how did I not know about that technology' moments). I'm wondering how popular XLST it is for web development? I've worked on a few websites (using php, ruby, and asp.net mvc) but I'm not a web developer by any me...

How do I design a custom Android control and use it in Xml?

I understand how to create a custom Android control, and I believe I understand how to pull attributes for it from the Xml layout. I don't know, however, how to get any children elements from it. Here's a visual example of what I'm trying to accomplish: public class Menu extends LinearLayout { // Custom Code } public class MenuIte...

SAP/ERP export file format?

Do we have some SAP/ERP expert here? I need to know what format SAP or other ERPs export their information to. Eg. product information, travelling information etc. Is it XML or could they export to other formats? Thanks ...

how to put a xml into couchDB?

hi, i want to do this: 1. PUT a xml string to couchdb server. something like: curl -X PUT http://localhost:5984/db/_design/app/_update/echo/h1 -d "<doc><name1>value1</name1><name2>value2</name2></doc>" at the couchdb server side, i parse the xml string into json object. save the json object as a document. is this possible? how...

using xslt how do i address this particular element in an xml file?

Never coded for XML before, totally lost with the various primers which all tell me to do something different. Which probably means you can do it different ways, but they all show single node situations and this isn't. I've tried various ways to pick out the WebDisplayPeriod but im convinced im not actually targetting the attribute of t...

XSL parse 2 xml file contemporary

Can xsl parse 2 XML file contemporary??? If true => How? ...

import XML file via AJAX.

The code below does most of what I need. The function is run every time a new image is loaded onto the page. However this has created 100 server requests to the same xml file.. which is not good lets be honest. So how do I rearange this function so only 1 xml request is used (even though im pulling 1 element out where i = id, the whole x...

XSL Sort by position() giving weird results

I have an XML file whose contents I want to sort by document order (basically in the order that the items were written out). I currently use the following code: <xsl:template match="/Error"> <xsl:apply-templates> <xsl:sort select="position()" order="descending" /> </xsl:apply-templates> </xsl:template> <xsl...

XML Parsing Error

hi every one . here i am creating xml file dynamically at run time but i m getting error XML Parsing Error: junk after document element Location: http://localhost/tam/imagedata.php?imageid=8 Line Number 9, Column 1: ^ $id=$_GET['imageid']; $dom = new DomDocument('1.0'); $query="select * from tbl_image_gallery where imageI...

.NET XML unhelpfully resolves entities on Save

I have a simple XML file like so: <?xml version="1.0" encoding="UTF-8"?> <foo attr="blah &#176; blah"/> When I load it into the .NET XmlDocument and issue a Save, i.e.: xmlDoc = New XmlDocument() xmlDoc.Load("c:\temp\bar.xml") xmlDoc.Save("c:\temp\bad.xml") the new XML file contains the resolved amp 176 (a degree sign). This then b...

Java and XML (JAXP) - What about caching and thread-safety?

I'd like to know which objects can be reused (in the same or different document) when using the Java API for XML processing, JAXP: DocumentBuilderFactory DocumentBuilder XPath Node ErrorHandler (EDIT: I forgot that this has to be implemented in my own code, sorry) Is it recommended to cache those objects or do the JAXP implementatio...

Array parsing in PHP

I have an array $array1 Array ( [0] => SimpleXMLElement Object ( [galleryid] => gallery.xml [galleryname] => Default [createdat] => 9/8/2010 5:55 pm [description] => Default ) } when i am running foreach($array1 as $node) { print_r($node) ; } am ge...

XML + XPATH: Any way to work with a default Namespace?

I have a XML SOAP result: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <soap:Body> <CreateCIInStockResponse xmlns="http://somenamespace.com/"&gt; ...

Groovy delete a tag in a XMLSlurper, replaceNode {} does nothing

I am parsing some XML with XMLSlurper (groovy 1.7.4) and I need to delete a tag (not make it empty!). Here is a code sample illustrating it: import groovy.xml.StreamingMarkupBuilder def CAR_RECORDS = ''' <records> <car name='HSV Maloo' make='Holden' year='2006'> <country>Australia</country> <record type='speed...

How to merge two XmlDocuments in C#

I want to merge two XmlDocuments by inserting a second XML doc to the end of an existing Xmldocument in C#. How is this done? ...

XML and Javascript: the right tool for the job?

Hello, For years I've been reading about XML and I have just not quite grokked it. Most documents I see about it simply explain the syntax (extraordinarily easy to understand) and say that it's portable: I've worked with Unix my whole life so the idea of putting things in plain text to be portable is hardly revolutionary. My specific ...

Rails XML builder

I have controller action in my rails application to output XML which in turn is used to generate a FusionChart. I am using a builder template for generating XML. Below is the code that is in builder template. xml = Builder::XmlMarkup.new xml.chart(:palette=>'2', ....) do for item in @domain_data xml.set(:label=>item[:domain],...

XSL select all node where not node of another node

Thse is my xml <element1> <subel1/> </element1> <element2> <subel2/> </element2> <element3> <subel3/> </element3> <criteria> <subel3/> </criteria> how i can select all node with xsl that not are in criteria subnodes? like these <subel1/> <subel2/> How is this done? If the xml is formated as: <element1> <el> subel1 </el> </eleme...