xml

Relaxer or JAXB for XML->Object Model?

I would like generate an AST from my XML-definition, to be used for code generation later on. The XML schema is written in Relax NG, since it seemed like a neater and more modern than XSD and DTD (loose assumption). I especially fancy the compact syntax, which feels more natural to work with and is far more readable than XML. Has anyo...

Latest version of XML not loaded in Firefox though works OK in IE

I am using AS2. I load an XML file in my movie. Somehow, the XML file is loaded. Now. if I change the XML file, the latest XML file do not appear in FireFox while lates XML file appears in IE. Can anybody tell what is the problem ...

How do you guard for Null Reference exceptions in Linq To Xml?

<?xml version="1.0" encoding="utf-8" ?> <pages> <page id="56"> <img id="teaser" src="img/teaser_company.png"></img> </page> </pages> I have an xml file that defines additional resources for pages within a cms. What's the best way to guard for Null Reference exceptions when querying this file with LinqToXml? var page = (from...

How to read XML into a class/classes that matches its xsd

So I have an XSD and a webservice that delivers in that same format. Now I could go ahead and read the xml into a document, create my objects from the class etc... But I am thinking, there must be some easier way to do that. Am I right? ;) Yahoo Maps GeocodeResponse XSD Yahoo Maps GeocodeResponse sample <ResultSet xsi:schemaLoc...

xml: is multiple level !ENTITY usage possible?

We are using XML to define a schema for controlling the contents which can be displayed in a diagramming tool. The schema file specifies what kinds of object can be placed on the diagram, how they can be linked together, and what properties these objects have (that is, what settable properties apper in the editor). When a new kind of di...

My linq-query doesn't work when adding the xmlns-attribute to the root-element in my XML-document

Hi I'm trying to get more into LINQ-to-XML, so I've made myself a neat little example XML-document to try things out on. In addition, I tried (and successfully) made my own XML-schema for that file, just to test things out. The XML-document is pretty straightforward, and pretty much looks like this: <cars xmlns="/carsSchema.xsd"> <ca...

Simple XML Question

I am creating XML at runtime its schema is like <Item> <Content>Hi</Content> </item> The problem is when I am trying to save some HTML contents to this Tag <Item> <Content><strong>Hi</strong></Content> </item> How to resolve this issue Thanks in advance ...

Xml Comparison in C#

Hi I'm trying to compare two Xml files using C# code. I want to ignore Xml syntax differences (i.e. prefix names). For that I am using Microsoft's XML Diff and Patch C# API. It works for some Xml's but I couldn't find a way to configure it to work with the following two Xml's: XML A: <root xmlns:ns="http://myNs"&gt; <ns:child>1</ns:...

Access DB Data Interchange

I'm currently building what is more or less a survey app in MS Access 2003. I want data access to be decentralized - users are operating on local data, not centrally stored data. Users need to be able to send some subset of the survey to another user to be filled out and returned. Users also need to be able to post the survey (as a fil...

How to set an Arrays internal pointer to a specific position? PHP/XML

Im trying to build a little site using XML instead of a database. I would like to build a next and prev button which will work relative to the content I have displayed. I found the php function next() and prev() as well as current() but I do not know how to set the pointer to a specific position to be able to navigate relative to the ...

Automation in FTPing and file extraction

Hi, A third party source daily FTPs a zip file (which contains xml file) in a given folder on my application server. Right now, am manually FTPing the sender, download the zip file and extract xml out of it. If i need to achieve all this programmatically using C#, how do I go about it? ie.I need to.... 1.FTP the sender 2.Download the f...

XSL + Java Script Issue ... Unable to call javascript function from xsl file

I am a newbie to XSL world and facing few issues with XSL <?xml version="1.0"?> <xsl:stylesheet xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="/"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"&gt; <h...

Append declaration to XML file

Creating XML out of data in Database by calling proc with bcp as SET @SQL= 'bcp "exec dbo.proc" queryout '+ @FileName +' -w -r -t -Sdd\SQL2005 -T ' (proc produced below) Everything is fine => creates XML as desired. Now task is to Add Declaration to this XML (<?xml version="1.0" ?>) How can this be achieved either in below proc or...

How to get current country-code/locale in XSL?

I am using XSL transform on XML. Some part of transform are dependent on current locale. Is there any way to find the current locale from within XSL? For example, the user-visible serialization of a floating point number can vary between locales ("1.0" in English is "1,0" in German), and my transform needs to take differences like these...

Mapping WSDL enumeration to string in ASP.NET webservice

Hi, Background: I'm in the process of creating a web service using ASP.NET 2.0. This web service provides another interface to an existing web form which contains selection boxes dynamically populated from a database. My first draft of the web service accepted a string for each of these and then ensured that it was valid, throwing back...

to extract a part of the URl after XML parsing?

Hi Guys.. I am trying to parse an XML file in which an element named "description" is as given below: <description><![CDATA[<a href='http://www.okmagazine.com/posts/view/13756/'&gt;&lt;img src='http://www.okmagazine.com/img/photos/thumbs/27044' /></a><br />Ashlee and Pete take their tiny tot to FAO Schwarz in NYC for some new toys. <p...

Excel: mapped XML data and the "number stored as text" error

A colleague of mine has an XML document which she opens in Excel 2007, using "Get External Data / From XML Data Import". Excel maps the XML to columns automatically. However, some elements store numerical data, which Excel refuses to treat as a number: <SOME_NUMBER>68.12</SOME_NUMBER> Instead, the cell shows the "number stored as tex...

How can I load a hashtable from an XML file?

I want to load all the name/value pairs into a hashtable from an XML file in C#. Note, the 'value' part may contain HTML markup, so it has to somehow escape from that. Would this be done in code or should I use CDATA? Example XML: <root><node name="node1">value</node><node name="node1">value2</node><root> ...

Using regex to fix xml content

I am attempting to fix some bilingual xml files using regular expressions to match known patterns of erroneous content and substituting the correct values. Most of the problems in the xml files can be considered typos or redundant data. I do have a text processing tool that works in software without any regex support, but the whole situ...

Is it Possible to get output in Excel through XML Publisher Reportingin Oracle Apps

Hi, I have a problem, I have to get the o/p in Excel of the report using Xml publisher, my report displays around 29 columns and those are not fiiting in the Word doc template(RTF) . So i need help like Is there any other method to design template eg Excel or anything which can accomodate all 29 columns and give o/p in Excel............ ...