xml

Possible to validate xml against xsd using code at runtime c#?

I have xml files that I read in at runtime, is is possible to validate the xml against an xsd file at runtime? using c# ...

X509Certificate2 validation on web service

Hi, I'm developing WCF web service that checks if a certificate in XML signature is valid. XML is signed with qualified and valid X509 certificate. While I am running service within Visual Studio development environment X509Certificate2.Verify() and X509Chain.Build() methods return TRUE. But when I publish my service under IIS these met...

How do I pass two namespaces into XSDObjectGen from command line?

I'm trying to use XSDObjectGen as a PreBuild in Visual Studio 2008. I can run it on the command line: XSDObjectGen\XSDObjectGen.exe AnalyticsDomainModel.xsd /l:cs /d /p /n:AdaptorAnalyticDomainModel.Primatives /n:AdaptorAnalyticDomainModel /f:AnalyticDomainModel This then prompts for me to type two names spaces: Imported namespace...

Should I generate XML as a string in C#?

When generating XML in C#, Is there a problem with generating it as a string? In the past I've found generating XML programatically very verbose and convoluted. Creating the xml through string concatenation/a string builder seems much easier but, it feels like bad practice. Should I generate XML as a string? ...

SQL, OPENXML and DateTime conversations...

Hi, I've inherited a mass of stored procedures that take as their only parameter a block of XML, the author then cracks it (using OPENXML) and then updates the a row. I've come across a problem while updating a table that has datetime columns, the following is a snippet of data that currently fails: declare @stuff nvarchar (max); set...

Transforming XML strcutures using Ruby

I've been wracking my brain trying to solve this problem. This is my first time using any scripting language for this kind of work, and I guess I might've picked a hard job to start with. Essentially, what I need to do is transform some basic XML into a heavier XML structure. Example : Translate the following : <xml> <test this="stuff...

How to delete buttons from a XML driven flash template from template monster

I am trying to delete some buttons from a XML drive flash template from template monster. After I delete the button from the XML file I can still see the button in flash and it has the title "Undefined". ...

ASP.NET MVC - Returning data as HTML or XML

When requesting http://someserver.com/user/btyndall I'd like to return HTML When requesting http://someserver.com/user/btyndall?format=xml I'd like to return XML representation of my model I've downloaded MvcContrib. (I can't believe XmlResult is not a part of the core framework) What is the proper way to handle the request in the cont...

XML to JavaScript hashes/arrays on the client

Any client js libraries for turning XML into a JavaScript object? I'm specifically working with RSS and ATOM XML. I don't want to go from XML to JSON then eval(). I'd like to go from XML directly to JavaScript hashes/arrays. ...

DocBook: Specifying code or markup

You can specify equations using <equation> and also several others, but what tag must be used to specify code? More specifically, PHP, HTML, CSS and Javascript? Is there a plugin that you can use with OxygenXML to add these features automatically? I need to output as PDF. ...

SQL Server FOR XML adding in a tag

Heya, So I am pulling data from a SQL Server 2000 DB then converting it to XML using FOR XML AUTO. The XML I get back looks like this. <Order OrderNumber="2000004" DeliveryPickupCharge="5.9900" SalesTaxTotal="0.0000" SubTotal="0.0000" Total="5.9900"> <Customer FirstName="Anthony" LastName="Caporale"> <Product ProductName="Pap...

Dynamic xml filtering and transform (in Java)

I have an XML file that looks like <?xml version='1.0' encoding='UTF-8'?> <root> <node name="foo1" value="bar1" /> <node name="foo2" value="bar2" /> </root> I have a method String processBar(String bar) and I want to end up with <?xml version='1.0' encoding='UTF-8'?> <root> <node name="foo1" value="proc...

How to classify users into different countries, based on the Location field

Most web applications have a Location field, in which uses may enter a Location of their choice. How would you classify users into different countries, based on the location entered. For eg, I used the Stackoverflow dump of users.xml and extracted users' names, reputation and location: ['Jeff Atwood', '12853', 'El Cerrito, CA'] ['Jarr...

Inserting Parent Child XML Data into SQL Server 2008

Hello, I have a xml document as string. I need to insert the data into Master and Detail tables in SQL Server 2008. I tried OpenXML and I want to use some other way in VB.net. I am using .net 3.5 <Orders> <Product> <productID>1</productID> <productName>Pens</productName> <ProductDetails> <productID>1...

sum of alternate numbers (XML/XSL)

Need to add alternate digits in a number receiving from XML file using XSLT, for instance If I am receiving a 123456789, I need to calculate alternate digit sum from right most using XSLT function, can i have any suggestions on this ? Thanks, Laxmikanth.S ...

When parsing with NSXMLParser, does it download the whole .xml then parse, or does it do a streaming parse?

Programming for iPhone. Title says it all. When parsing with NSXMLParser, does it download the whole .xml then parse, or does it do a "streaming" parse? Essentially if I abort the parse halfway through, do I save bandwidth, or just cpu cycles? ...

How do I avoid reading the byte order mark (BOM) in a Resources file in Visual Studio?

I am trying to use the Visual Studio editor to create XML files in the Resources area of an Assembly in C#. The files appear perfectly correct in the XML editor and honour my schema (recognising the elements and attributes). However when I try to read them (from the Resources) they fail because they consistently have 3 spurious character...

XML databinding to TreeView (or Tab control), bind attribute based on different attribute

Hello, I have some xml: <Test> <thing location="home" status="good"/> <thing location="work" status="bad"/> <thing location="mountains" status="good"/> </Test> The leaves on the TreeView are the values of the status attribute; the nodes will be the value of the location attribute. ├──bad │.....└──work └──good .......├──home ....

XML Schema for a bit complicated record

I am having a problem building a schema for this XML: <record> <field index="1">data</field> <field index="2">data</field> <field index="3">data</field> <field index="4">data</field> <field index="5">data</field> <field index="6">data</field> <group index="7"> <member index="1">data</member> <...

Consuming Zend_Rest_Server response with jquery

Is there is standard way to consume Zend_Rest_Server response with jquery? I have a simple web service that I need to invoke and process result with ajax, preferrably JQuery. I assume I can parse xml response somehow, but that doesn't look like a mature solution. ...