xml

C#: XmlTextWriter.WriteElementString fails on empty strings?

Hello, I'm using XmlTextWriter and its WriteElementString method, for example: XmlTextWriter writer = new XmlTextWriter("filename.xml", null); writer.WriteStartElement("User"); writer.WriteElementString("Username", inputUserName); writer.WriteElementString("Email", inputEmail); writer.WriteEndElement(); writer.Close(); The expected...

Flex: Convert ArrayCollection to XML

In Flex, it's easy to convert the XML to Object and to ArrayCollection by using var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(); decoder.decodeXML( xml ); But is there a good way to convert ArrayCollection to XML. I have search a while on the internet and havn't found any answer. Thanks. ...

Jquey and XML parsing help

Here's the Scenerio, I'm creating a simple app for my friend's website where his users could add image w/ a caption. The problem is My Friend's Webhost don't allow him to use server side scripts and Database. He is just allowed to insert javascript and HTLM on the site. So I think the solution would be doing it in XML instead of Databa...

is it possible to script a .XML file

Hi, is it possible to script a .XML file? what we are after is there will be a .XML file on a webserver (IIS) for e.g. www.myserver.com/update.xml which when called should execute it as a script rather than serve it as a file. when the .XML file is called it will excute a series of calls example make a DB trip and then return the re...

jQuery/XML: synchronizing data and representations using DOM-Mutation-Events

Hi, I'm creating a web application which uses jQuery to modify and HTML to represent the data. There can be several representations in the document related to a single data node. The user can dynamically create them. For example, data will be represented and can be modified in tables. Additionally the user has the opinion to extend a "q...

XML validation with an external DTD in Java

How can I test an xml string to see if it validates against and dtd file? I've read this question but they only see to be talking about replacing the dtd declaration on an xml file. Person.DTD <?xml version="1.0" encoding="UTF-8"?> <!ELEMENT person (id)> <!ELEMENT id (#PCDATA)> Test @Test public void should_serialize_a_shootout_to...

Why won't this XPath query work on an .edmx file?

I'm trying to get the list of EntityTypes in an EDMX file, and the following query returns no results: XmlDocument edmxFile = new XmlDocument(); edmxFile.Load(args[0]); XmlNamespaceManager nsMan = new XmlNamespaceManager(edmxFile.NameTable); nsMan.AddNamespace("edmx", "http://schemas.microsoft.com/ado/2007/06/edmx"); nsMan.AddNamespace...

change variable value in xsl

I'm having a problem with XSL variables. I know that once declared, the value of the variable cant be changed. But I'm facing a rather strange problem and I cant possibly change the XML output, instead figure out if its possible with XSL itself. I'm using xsl:for-each to loop over some data in the XML. The data being looped can be of ...

Data Type Mapping

Hi , I need to store XML data to database(MS SQL Server). The data type defined in the column is text. I need to know the the equalent datatype for text. I have tried with adLongVarChar but it does not works. Also I tried with adLongVarWChar(nText). But both are not working. Need help. Thanks. ...

help with php and xml for yahoo service

I am working on a PHP code for my social network, what I am planning to do is on user signup or profile update I will take there zipcode that they enter and use yahoo to lookup there lattitude and logitude from there zipcode I will then save these value to there user mysql table, this will be used later on to find users located within X ...

How to assert for each child one element is present or not

<ClinicalDocument> <entry> <substaceAdministration> <effectiveTime></effectiveTime> </substaceAdministration> </entry> <entry> <substaceAdministration> <effectiveTime></effectiveTime> </substaceAdministration> </entry> <entry> <substaceAdministration> </substaceAdministration> </e...

RuntimeException from xmlbeans - can't find compiled schema

I'm getting a RuntimeException while executing some code that depends on generated xmlbeans classes. I can't figure out if this is: me missing something during code-generation or packaging a runtime dependency missing a misleading error message, and I should be looking elsewhere. The xbean.jar version is the same in the build and exe...

Ruby on Rails - how to render as xml models with has_many associations

I have a ruby on rails application which has two models - ltests and sub_tests. An ltest has a 'has_many' association with sub_tests. In the show method for ltests is as follows. respond_to do |format| format.html # show.html.erb format.xml { render :xml => @ltest } end This renders the ltest object. However the sub_tests belongi...

How to convert XML file to a Database?

I recently downloaded the SO Data Dump and was wondering how I could convert it from XML to a DB that I could use in my .NET applications. ...

C# XmlTextWriter: Allows Unicode?

Hi, I'm using XmlTextWriter to save certain configuration elements for my program (it's only 10-15 string values, this is why I'm using XmlTextWriter). My code looks as follows: XmlTextWriter writer = new XmlTextWriter("FILENAME.XML", null); writer.WriteStartElement("Config"); writer.WriteElementString("Param1", param1); writer.WriteE...

Converting large set of word documents automatically into xml, modify them and than convert them into latex, pdf, html

Having a set of about 400 Documents in word which are part of a Quality Management System Word is causing me a lot of grieve because a) it handles images in large doc poorly b) the layout gets sometimes busted c) it is cumbersome to configure the documentation for different clients. I can convert single documents by saving them as xml/...

What does "xmlns" in XML mean?

I saw the following line in an XML file: xmlns:android="http://schemas.android.com/apk/res/android" I have also seen xmlns in many other XML files that I've come across. Can someone please explain what it is? ...

How can i find XElement using linq

Hi there. I m working with c#. <Tüberkiloz> <Kod> 1000 </Kod> </Tüberkiloz> <Tifo> <Kod> 1001 </Kod> </Tifo> <Bakteriyel_Endokardit> <Kod> 1002 </Kod> </Bakteriyel_Endokardit> this is my xml. And i wanna take Tifo. I must use "Kod" nodes. e.g XpathSelectelement("Kod").value = 1001 ...

VS2008 crashes with xml when in project

Having an issue with vs2008, anytime I have an xml file in a project and go to open it, devenv crashes out. Not specific xml files, but all I've tried. Have reinstalled vs2008 and run devenv /safemode. If I open the same xml file directly without a project, no problems. Any Ideas? Unhandled exception at 0x76f76541 in devenv.exe: 0xC0000...

Populating treeview with XSD elements and attributes in VB 2008

I'm trying to create a treeview in a VB 2008 project that shows all the elements and attributes of an XML Schema. The MSDN documentation for XML schemas seems to imply that by loading the schema into an XMLSchemaSet and compiling it I should get access to all the elements and attributes with their values but this doesn't seem to work in...