xml

Write visual studio project from code

Is there any way to write a Visual Studio Project file easy or do i have to look at the xml format and write it by hand? Is there any lib for this in .net framework(3.5)? Im using vb.net but c# would also work.. ...

parse xml response with jQuery

HI all, I use jQuery to parse my xml responses. I have this xml : <?xml version="1.0" encoding="UTF-8"?> <response status="ok"> <client_id>185</client_id> </response> And i want to get "client_id" value. ...

XSD: How to depend the "use" attribute (required/optional) with the other value?

Hello, I'm trying to do some specific stuff in XSD XML Schema: I want to set an element as use="required", only if there a specific value to some attribute of other element. Example: <udi att1="all"> <name att2="dsd"/> <phone att3="dsd"/> </udi> I want the that the "phone" element will be a required one, if the "at...

Convert query to variables for multi-language

I have built a couple of multilingual sites which output labels from an XML file - the XML file used is determined by a cookie (ENG, NL, ESP etc) and looks like this: <resources> <coming>Coming soon</coming> </resources> I've been using a script which, within a function, takes each XML child and makes a variable from it's value: ...

Best XPath 2.0 Expression Evaluator (Eclipse)

What are the best XPath 2.0 Expression Evaluator for Eclipse? Any other standalone that is worth saying? ...

NullReferenceException when using Linq to XML

Given this xml document: <projects><project><name>sample project</name><location>http://somewhere.com/&lt;/location&gt;&lt;/project&gt;&lt;/projects&gt; And this linq to xml statement for retrieving name/location elements and creating a new Project object: return xmlDocumentFromAbove.Descendants("project").Select(p => new Project(p.E...

What approach to take for caching unique auto-suggest lists for users?

I am making an app (asp.net/c#) that will autosuggest a couple fields that users type in. Each user will end up building their own auto-suggest list. Every time they add an item, if it's a new word, it will get added to their list of auto-suggests, just like gmail. I was wondering how most people go about this? Making a call to the s...

Custom serialization in JAXB

Hi, Is there a way to customize XML serialization in JAXB, in the same way that it's possible using IXmlSerializable in .NET? (i.e. the ability to directly control serialization of an object using the equivalent of an XmlReader/Writer). I've taken a look at XmlAdapter and @XmlJavaTypeAdapter, but they just seem to be used to transform ...

PHP XML Parsing

Which is the best way to parse an XML file in PHP ? First Using the DOM object //code $dom = new DOMDocument(); $dom->load("xml.xml"); $root = $dom->getElementsByTagName("tag"); foreach($root as $tag) { $subChild = $root->getElementsByTagName("child"); // extract values and loop again if needed } Second Using the simplexml_load Me...

Parsing XML from the National Weather Service SOAP Service in C# LINQ to XML

Hello folks, I'm a junior C# programmer that's trying to develop a library that will allow me to encapsulate the nasty details of parsing the XML returned from the NWS, and returning a collection representing the data. My SOAP request would return an XML document in this form: <?xml version="1.0" encoding="UTF-8"?> <dwml version="1.0" ...

Paging Through XML Data Using jQuery and HTML

I've got an XML file that contains a list of questions. I'd like to load the first question in the list when an HTML page loads and load the answers as radio buttons. When one of the radio buttons is selected, I'd like to display the results as well as a continue button. The continue button would go to the second element in the XML file....

Creating a Survey using jQuery - Any examples?

I'm looking for a very basic survey/wizard example using jQuery and HTML. I'd like it to connect to a text file or XML file and be independent of SQL, PHP, ASP.NET, or any other scripting language outside of JavaScript. TIA UPDATE: I'm looking for a solution that will ask a single question at a time. Then, based on the multiple choice ...

In an Atom feed is it ok to change the "updated" field when an entry has its content changed?

If an Entry represents some file/resource that has changed - is it enough to change the updated field? I note that most feed readers won't show it as "new" as it has the same UUID? rfc4287 says that I can change it, but feed readers seem to ignore it. ...

How to read multiple records in XML doc

I can read one record from Xml just fine with some code I have, but how do you read multiple in an xml file such as so: <?xml version="1.0" encoding="UTF-8"?> <XXX_XXX_response xmlns="http://XXX.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://XXX.com/1.0/ http://XXX.com/1.0/XXX.xsd" list="true...

Represent space and tab in XML tag.

How to represent space and tab in XML tag. Is there any special characters for them to represent. ...

Microsoft SQL Server 2005/2008: XML vs text/varchar data type

Does it have any sense (except of server side validation XML/schema/dtd) to store XML in XML type instead of text/varchar/ntext? I'm not planning to do any XML manipulation on database side. Purpose of my investigation is to decrease database size. Can a using an XML data type for untyped XML for the purpose? Which other pros and cons i...

XPath Version Search

How would I find the node(s) with the max version from the following document: <GateKeeperFiles> <File> <Name>GateKeeper.exe</Name> <Major>2</Major> <Minor>1</Minor> <Build>1</Build> <Revision>6</Revision> </File> <File> <Name>GateKeeper.exe</Name> <Major>1</Major> <Minor>1</Minor> <Build>1</Bui...

Is there any way to retreive the comments from an XML file?

Is there any way to retrieve the comments from an XML file? I have an XML file, with comments in it, and i have to build an user-interface based on each node in this file, and the associated comments. I can't seem to find a way to get those comments. I was able to get 'some' of them using simpleXML, but it didn't work for the root node...

simplest xml editor for non programmers

Hi I need the simplest editor with utf-8 support for editing xml files in windows; something like wordpad is perfect. It's for a non programmer, to edit existing files (up to now he used wordpad, but now that I translated the files in utf-8 encoding a lot of italian accents are obviously unreadable). Any suggestion? Thanks, this would ...

What is the best way to join multiple element values into a new string in xslt 2.0

Hi All, I need to join multiple element values into a new string separated with whitespace, what is the best way to do this? I am using xslt 2.0. Thanks in advance. ...