xml

generate javascript using xml and xsl

I have tried every solution I found on here and even a larger Google search but nothing seems to work. Here is my problem... I have data that is in XML that I would like to visualize using the Google Visualization API. I was hoping I could simply use XSL to generate what I need instead of doing anything with data sources (I have my re...

Generation Xpath expression in runtime

Hi, I need to generate some kind of a nested Xpath on runtime. Do you know of any Java lib or helper, which can assist with the creation of a complex Xpath expression ? It need it to support nesting, AND, OR and simple operators like equal and contains. Here is an example of an expression I need to build at runtime (The number of 'Poli...

Exception trying to Update Service reference!!

I have a Silverlight Application that use a WebService for MultPorpose, When i usa that markers: [XmlInclude(typeof(StringCustomField))] In on of my classes i get that error: System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension: System.ServiceModel.Description.DataContractSerializerOperationB...

PHP and dealing with foreign characters for UTF-8 XML

I am currently scraping some data from the internet and converting into xml documents. document being scraped is utf-8 according to its meta tags The problem is some of the data contains foreign characters, I cannot find a way of reliably converting them into XML / utf-8 friendly entities, the following errors are what I have managed...

How to parse (encoded)data from xml to exel

Hi, I have an xml file where I have a structure in which some of the data is encoded. When I convert the xml file into excel file, the column for the encoded data is presented by the URL. Is there any way I can parse that data into actual data for anylizing. tnx. ...

Best way to prettify an XmlDocument (.NET)?

Let's say I have a System.Xml.XmlDocument whose InnerXml is: <comedians><act id="1" type="single" name="Harold Lloyd"/><act id="2" type="duo" name="Laurel and Hardy"><member>Stan Laurel</member><member>Oliver Hardy</member></act></comedians> I'd like to format it thusly, with newlines and whitespace added: <comedians> <act id="1" ...

Looping through XML in .NET?

I have some XML that looks something like the one below <DriveLayout> <Drive totalSpace="16" VolumeGroup="dg01" /> <Drive totalSpace="32" VolumeGroup="dg01" /> <Drive totalSpace="64" VolumeGroup="dg02" /> <Drive totalSpace="64" VolumeGroup="dg02" /> <VolumeGroups> <VolumeGroup VolumeGroup="dg01" storageTier="1" /> <VolumeGroup VolumeGro...

How to reference one XML document from a second XML document

In relational databases, the use of primary keys and foreign keys are commonly used to link records across different tables. I'm wondering if I can do the same sort of thing with XML documents. That is, I would like one XML document to contain an element whose value 'points to' the 'primary key' or something similar (maybe the root nod...

Zorba (XQuery) - using print functions

I'm using Eclipse's XQDT with Zorba 0.9.5. I'm trying to call the Zorba internal function zorba:print(...) from within a FLWOR expression, but it gets ignored. Specifically, I'm doing something like the following import module namespace zorba = "http://www.zorba-xquery.com/zorba/internal-functions"; for $l in list let $bar :=...

Get data from an XML .NET DataSet in PHP

I have the following XML from a .NET web service: <?xml version="1.0" encoding="utf-8"?> <DataSet> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true"> <xs:complexType> <xs:choice max...

Password-protect Excel file using CarlosAg.ExcelXmlWriter

How do you password protect an excel file that is being generated using the CarlosAg.ExcelXmlWriter (.NET C#)? ...

Copying part of one XML DOM to another for XSL transformation (.NET)

The scope of XML and DOM in .NET 3.5 is so large that I'm having trouble coming up with a simple solution to my problem without using too many lines of messy code. Since people here always come up with some elegant solutions, I thought it would be a good question. How do I take in an XML file (that I created and saved earlier in the pro...

How does one use EXSLT modules in XMLSpy?

I'm trying to use the EXSLT modules (specifically, math), in an XQuery document. How do I enable support for this in XMLSpy? Where would I place the downloaded EXSLT libraries to make XMLSpy aware of them? ...

Count the number of nodes in an XML snippet using Javascript/E4X

Consider this problem: Using Javascript/E4X, in a non-browser usage scenario (a Javascript HL7 integration engine), there is a variable holding an XML snippet that could have multiple repeating nodes. <pets> <pet type="dog">Barney</pet> <pet type="cat">Socks</pet> </pets> Question: How to get the count of the number of pet ...

Converting XML to escaped text in XSLT

How can I convert the following XML to an escaped text using XSLT? Source: <?xml version="1.0" encoding="utf-8"?> <abc> <def ghi="jkl"> mnop </def> </abc> Output: <TestElement>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;abc&gt;&lt;def ghi="jkl"&gt; mnop &lt;/def&gt;&lt;/abc&gt;</TestElement> Currently, I'm trying...

Map XML data from different XML Schema

Hi, We've an XML contains data. We need to extract data from it and move it in to a different XML. Both XMLs are different in structure. We have Altova and we want to do this job by using it. Any solution on this; which Altova tool will be best for this job and how? Thanks. ...

xml transformation - add attributes to previous node depending on current node.

I've got an ejb-jar.xml that doesn't have an 'id' attribute in the tag. What would be the best way to fix this? Could XSLT be used for this? <session> <ejb-name>EJB1</ejb-name> <local-home>x.E1LH</local-home> <local>x.E1L</local> <ejb-class>x.E1EJB</ejb-class> <session-type>Stateless</session-type> <transaction-type>Contai...

Load xml file in flex before application start/intialises

Hi, I've got a configuration xml file that I need to parse for values before a flex application laods. I've created a static class that allows for the values in the xml config file to be retrieved. I'm initialising this class when the application first loads but as the xml file is loaded with a Loader class that loads a synchronously ...

XPath headache, find nodes with attributes between a range

Head hurts on this one so can someone throw me a line? XML is like so (not the real stuff but this is an example for clarity): <root> <groups name="A"> <entry from="1" to="10" /> </groups> <groups name="A"> <entry from="11" to="20" /> <entry from="21" to="30" /> </groups> <groups name="A"> <entry...

cocoon 2.2 tutorials

does anybody knows a good cocoon 2.2 tutorial? ...