xml

c# xml deserialize

I have xml wherein i have xml within it again, like: <?xml version=\"1.0\" encoding=\"UTF-8\"?> <Tag> <Value1> </Value1> <Value2><?xml version=\"1.0\" encoding=\"UTF-8\"?>... </Value2> </Tag> Deserializing doesnt work on this string in c#. I construct this string in java and send it to a c# app. how can i get around this? ...

XSL ignores my whitespace even with the <xsl:text> tag

I'm making a header in my XSL code that includes multiple fields of information, i.e. "Name: Bob Birthdate: January 1 1900," etc. I enclosed them in tags as such: <xsl:text> Gender: Male </xsl:text> But on the page, the whitespace around Gender/Male is being ignored. Is there something I'm missing? Thanks in advance. ...

stop overwriting an xml file

hey from my previous question.. ive managed to finally get it all working... if i click submit.. a file is then created in xml format but if i enter new data it will overwrite the same file how do i stop this.. this is the code i am using Protected Sub btnWriteXML_onClick(ByVal sender As Object, ByVal e As System.EventArgs) T...

Manually iterating over a selection of XML elements (C#, XDocument)

What is the “best practice” way of manually iterating (i.e., one at a time with a “next” button) over a set of XElements in my XDocument? Say I select the set of elements I want thusly: var elems = from XElement el in m_xDoc.Descendants() where (el.Name.LocalName.ToString() == "q_a") select el; I can use an...

What is the recommended way of parsing an XML feed with multiple namespaces with ActionScript 3.0?

I have seen the following methods to be used in several online examples, but haven't found any documentation on the recommended way of parsing an XML feed. Method 1: protected function xmlResponseHandler(event:ResultEvent):void { var atom:Namespace = new Namespace("http://www.w3.org/2005/Atom"); var microsoftData:Namespace = ne...

Display custom title bar for Android with XML

In Android documentation describing "Configuring General Window Properties", it is suggested that specifying properties via XML is preferable whenever possible to avoid seeing the title bar flash. As an example, instead of setting Window.FEATURE_NO_TITLE with requestWindowFeature, they set it to @android:style/Theme.NoTitleBar. Is there ...

SimpleXMLElement to PHP Array

Variable $d comes from file_get_contents function to a url. $answer = @new SimpleXMLElement($d); Below is output of the print_r($answer): SimpleXMLElement Object ( [Amount] => 2698 [Status] => OK [State] => FL [Country] => USA ) How can I retrieve value of each element and add to an array? can't figure it out. ...

How to valiadate a xml document with Multiple xml-schemas

xmlns:m="http://www.MangoDSP.com/mav/wsdl" as localfile:"ma.wsdl" xmlns:m0="http://www.MangoDSP.com/schema" as localfile:"MaTypes.xsd" how can i validate it. ...

Complex sorting of XML subnodes in .Net3.5 onwards

XML structure expressed in Xpath kind of Records/Record/Actions/Action/ActionDate the other node on the same level Records/Record/Actions/Action/CTCDate Is there easy or not easy way to sort it on "order by ActionDate,CTCDate" ( in SQL notation ), but per Actions for each selected Record ( not per XML file ) when we iterate somehow...

Segregate top element out of a list using XSL

I currently have a <xsl:foreach> statement in my XSL processing all elements in this XML file. What I want to do though is process the first one separately to the rest. How can I achieve this? Here is my current code: <ul> <xsl:for-each select="UpgradeProgress/Info"> <xsl:sort select="@Order" order="descending" data-type=...

From Java/C++ to XML

I know Java and C++ but am looking to get in to XML. I don't want to waste time reading over the basics of programming in a book, so has anyone any recommendations for resources for learning XML that assume a knowledge of programming already, or even better highlight how to switch from Java/C++ to XML ie. main differences etcs. ...

parsing local xml file using Sax in android

Hello, Can anyone tell me how to parse a local xml file stored in the system using SAX ,with an example code.please also tell me where can i find information on that ...

Selecting unique elements using XSLT.

I have the following XML: <option> <title>ABC</title> <desc>123</desc> </option> <option> <title>ABC</title> <desc>12345</desc> </option> <option> <title>ABC</title> <desc>123</desc> </option> <option> <title>EFG</title> <desc>123</desc> </option> <option> <title>EFG</title> <desc>456</desc> </opt...

Copying paragraph content

In my DocBook document I have several sections, which follow this pattern: the section name the short description the long description I'd like to create an index of these sections. But I need it to be a table, which is formatted the following way: | link_with_section_name | short_description | | <link id="section1_id">the section n...

Store a byte[] stored in a SQL XML parameter to a varbinary(MAX) field in SQL Server 2005. Can it be done ?

Store a byte[] stored in a SQL XML parameter to a varbinary(MAX) field in SQL Server 2005. Can it be done ? Here's my stored procedure: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[AddPerson] @Data AS XML AS INSERT INTO Persons (name,image_binary) SELECT rowWals.value('./@Name', 'varchar(64)') AS [Nam...

"Decisiontable" in WIX

Hi Guys, I'm searching a way to create a Setup with WIX, which is loading settings from a xml-file (or onle a simple table in the file) and modifies the features of the setup depending on the data in the xml/table. Any ideas? Cheers - Admirandis ...

Is there an equivallent for NSXMLParserDelegate in the cocoa touch framework?

Like the title says, I want to parse XML in my iPhone application, but there is no NSXMLParserDelegate protocol like there is in the System Foundation framework. Can I just add a reference to the /System/Library/Frameworks/Foundation.framework in my iPhone application? ...

How can I generate an XML using Perl and XSLT?

I want to generate an XML file using Perl and XSLT. Is it possible to achieve this by updating the XSLT dynamically by uusing values from a hash? Or is there any better solution for wirting a simple XML file using Perl? ...

Leave entity intact in XML + XSLT

I transform XML to (sort of) HTML with XSL stylesheets (using Apache Xalan). In XML there can be entities like &mdash;, which must be left as is. In beginning of XML file I have a doctype which references these entities. What should I do for entity to be left unchanged? <!DOCTYPE article [ <!ENTITY mdash "&mdash;"><!-- em dash --> ]> ...

In SQL Server, can multiple inserts be replaced with a single insert that takes an XML parameter?

So I have an existing ASP.NET solution that uses LINQ-to-SQL to insert data into SQL Server (5 tables, 110k records total). I had read in the past that XML could be passed as a parameter to SQL Server but my google searches turn up results that store the XML directly into a table. I would rather take that XML parameter and insert the n...