xml

Paste from Word + Create XML document -> hexadecimal value 0x0C, is an invalid character (.Net)

I have a webpage that accepts HTML-input from users. The input is converted into an xml document using the System.Xml namespace, like this: var doc = new XmlDocument(); doc.AppendChild(doc.CreateElement("root")); doc.DocumentElement.SetAttribute("BodyHTML", theTextBox.Text); Afterwards an Xsl transformation (System.Xml.Xsl.XslCompiled...

How do I alter the XML DOM with javascript, when using XML+XSLT client side.

For example: XML: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="example.xsl"?> <document> <foo>bar</foo> </document> XSL: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; <xsl:template match="/"> <html> <head> <title>example</title> ...

XmlSerializer - Deserialize different elements as collection of same element

I have the following XML part which schema I can't change. NUMBER, REGION, MENTION, FEDERAL are columns: <COLUMNS LIST="20" PAGE="1" INDEX="reg_id"> <NUMBER WIDTH="3"/> <REGION WIDTH="60"/> <MENTION WIDTH="7"/> <FEDERAL WIDTH="30"/> </COLUMNS> I want to deserialize it to public List<Column> Columns {get;set;} property. So elem...

Replacing XML reserved characters in SQL Server 2005

I'm working on a system that takes relational data from a sql server DB and uses SSIS to produce an XML extract using sql server 2005's 'FOR XML PATH' command and a schema. The problem lies with replacing the XML reserved characters. 'FOR XML PATH' is only replacing <, >, and &, not ' and ", so I need a way of replacing these myself. I...

How to ignore comments when reading a XML file into a XmlDocument?

Possible duplicate: How to remove all comment tags from XmlDocument Hello, I am trying to read a XML document with C#, I am doing it this way: XmlDocument myData = new XmlDocument(); myData.Load("datafile.xml"); anyway, I sometimes get comments when reading XmlNode.ChildNodes. For the benefit of who's experiencing the same requi...

XML .NET Library

Is it any XML .net library like simplexml in PHP? For example: <root> <obj> <val>value1</val> </obj> <obj> <val>value1</val> </obj> </root> objects = .....Parse(xml); Console.WriteLine(objects[0].val.ToString()); ...

SUDS rendering a duplicate node and wrapping everything in it

Here is my code: #Make the SOAP connection url = "https://api.channeladvisor.com/ChannelAdvisorAPI/v1/InventoryService.asmx?WSDL" headers = {'Content-Type': 'text/xml; charset=utf-8'} ca_client_inventory = Client(url, location="https://api.channeladvisor.com/ChannelAdvisorAPI/v1/InventoryService.asmx", headers=headers) #Make the SOAP he...

Does XSD allow simpleContent and complexContent at the same time?

I want to write an xsd for the xmlrpc spec (and generate java classes out of it using jaxb). The xmlrpc spec allows values like: <value><int>123</int></value> <value><boolean>1</boolean></value> But at the same time it requires: If no type is indicated, the type is string. Which means i could receive something like this: <value...

Reorder nodes in xml using xslt

Hello, How I can transform a xml like this: <xml> <paragraph> <data> <label> title </label> </data> <data> <label> subtitle </label> </data> <data> <label> text </label> </data> <data> <label> image </label> </dat...

What is the proper syntax for describing a <SELECT> form element to Zend_Form using XML as the config?

I am using an XML config file to tell Zend_Form what elements I want. I would like to have a <select> element, but I am unsure as to how to add <option> tags using the XML syntax. Sure I am missing something pretty basic. Ben ...

Is XSLT worth investing time in and are there any actual alternatives?

I realize there have been a few other questions on this topic, and the general concensus is to use your language of choice to manipulate the XML. However, this solution does not quite fit my circumstances. Firstly, the scope of the project: We want to develop platform independent e-learning, currently, its a bunch of HTML pages but as t...

Jquery .text() seems not to work on XML in IE7

My PHP backend sends XML response to the client (ajax): <response> <code>0</code> <message>OK</message> </response> in the javascript I'm trying to get CODE value in this way: var errorCode = $('code', xml).text(); and then depending on errorCode value I do processing. It is working fine in all browsers I tested except IE7. In...

How can I save data from a Windows Form to an XML file?

I pretty sure I have to create some sort of mold of what the XML file has to look like first, right? Any help will be appreciated. ...

Do I have to worry about escaping XML reserved characters before I return a DataContract object from an OperationContract in WCF?

Hi, I am pretty inexperienced with WCF. I have a DataContract that implements the IExtensibleDataObject interface. Some of the members of this object are populated from freetext input and could contain XML reserved characters ('>', for example). I imagine that I get escaping of these characters for free with WCF, but I have been look...

ANDROID: Line Break in XML formatting?

Hi. when editing a String in XML I need to add line breaks. And I wanted to ask what is the RIGHT form when programming for android? Because <br> works but ECLIPSE marks the area as problematic. If I check out suggestions Eclipse tells me that I shall add a end tag </br> - IF I add that the line break dissapears... So the one works but...

Treating empty elements as nulls in SQL Server's OPENXML function

I have the following (highly simplified) XML document that I am reading into my database using the OPENXML function: <root> <row> <bar>123</bar> </row> <row> <bar>0</bar> </row> <row> <bar></bar> </row> </root> I am importing in into the database like so: insert into [Foo] ([bar]) s...

Parsing XML feed into Ruby object using nokogiri?

Hi all, I am pretty green with coding in Ruby but am trying to pull an XML feed into a Ruby object as follows (ignore the ugly code please): <% doc = Nokogiri::XML(open("http://api.workflowmax.com/job.api/current?apiKey=#{@feed.service.api_key}&amp;accountKey=#{@feed.service.account_key}")) %> <% doc.xpath('//Jobs/Job').each do |node|...

Android: TabHost How To: set new content in existing tabs upon menu button?

Hello stackoverflow, I recently started Android programming and was working on my first program which displays a historic text document, sectioned by tabs via TabHost. I have limited my program to one activity and merely used setContent in my TabSpec's to switch between different XML views. The document has both unedited and corrected...

Benifits of schema 1.1

Is there any significant benefit of using schema 1.1 over 1.0? ...

XML and XSLT: need it to sort only certain child nodes

Hello, I need to have my XSLT stylesheet sort my XML file's child nodes, but only certain ones. Here's an example of what the XML is like: <?xml version="1.0"?> <xmltop> <child1 num="1"> <data>12345</data> </child1> <child1 num="2"> <data>12345</data> </child1> <child2 num="3"> <data>12345</data> </child2> <child2 num="2"> <data>1234...