xml

How to query xsi:type from an attribute using Linq to XML?

Hello, Given this xml: <?xml version="1.0" encoding="utf-8"?> <EntityDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <components> <component xsi:type="TypeA"> <Property1>100</Property1> </component> <component xsi:type="TypeB"> <Property2>100</...

Reordering XML nodes according to defined schema

I'm merging a couple of .xml files together, and need to take certain child elements from each .xml document and put them into a 3rd. And that's OK, but the problem is that then my "child" nodes are in a somewhat random order (well, what I picked from the first file, followed by what I picked from the 2nd), and the schema file (the .xsd...

replacing node text using lxml.objectify while preserving attributes

Using lxml.objectify like so: from lxml import objectify o = objectify.fromstring("<a><b atr='someatr'>oldtext</b></a>") o.b = 'newtext' results in <a><b>newtext</b></a>, losing the node attribute. It seems to be directly replacing the element with a newly created one, rather than simply replacing the text of the element. If I try ...

Disable decoding of xml text content

Is it possible to disable decoding xml text content when parsing an xml file using Java? For example so &quot; is returned as is instead of being converted to a quote Effectively want the text content treated as if it was wrapped in a CDATA block ...

Getting bad content in trailing section exception, when parsing xml produced by C# client in a GAEJ app

I am trying to POST a potentially large chunk of xml from a C# client to a GAEJ app, and then parse it into a DOM document. I've managed to get the documentbuilder to parse the xml by parsing the request data into a string and then trimming it, as such: String xml; BufferedReader rdr = req.getReader(); String ...

How to encrypt and decrypt custom configuration files (XML files) in C#

Hi guys... I am new to the forums. I've just started working on C# and webservices for the past 3 months and I've got a great web service rearing to go. Unfortunately, there is a custom "configuration" file (really an XML file) that we use to store our connection strings. We don't want to use the web.config connectionstring section bec...

Pythonic Way to Create Union of All Values Contained in Multiple Lists

Hi all, Doing some XML processing in python. (Edit: I'm forced to use Python 2.4 for this project, boo!) I want to know what is the most Pythonic way to do this (create union of all values in multiple lists): def getUniqueAttributeValues(xml_attribute_nodes): # split attribute values by whitespace into lists result_lists=lis...

Deserializing difficultly formed XML to C# object

I have XML that is returned by a 3rd party web service in the following form: <object> <list name="subscriptions"> <object> <string name="id">something</string> <string name="title">something else</string> <list name="categories" /> <number name="timestamp">1252707770116</nu...

How to encrypt multiple copies of an XML element within a single XML document

Hi again everyone. I have an XML encryption routine based on the MSDN article http://msdn.microsoft.com/en-us/library/sb7w85t6.aspx My code is here public static void Encrypt(XmlDocument Doc, string ElementName, SymmetricAlgorithm Key) { //////////////////////////////////////////////// // Check the argum...

Process sizes and differences in behaviour on 32bit vs. 64bit Windows versions

I am investigating a strange problem with my application, where the behaviour is different on 2 versions of Windows: Windows XP (32-bit) Windows Server 2008 (64-bit) My findings are as follows. Windows XP (32-bit) When running my test scenario, the XML parser fails at a certain point during the parsing of a very large configuration...

Is it possible to use Excel/Access to consume a SOAP based web service using WS-Security?

The extent of my ability is in vba and asp. I'm interested in consuming a SOAP web service from Excel or Access, mostly because it's easier for me. I've also got the wsdls for the web service which is using ws-security. Is this even possible? From what I've read, .net is my logical option, but there's obviously a gap in my skill. Is...

How can I show the data from a XML file follow list format ?

Hello everybody, I have a problem with jQuery and XML. I am using jQuery to load data from a XML file. It works fine but I want to show data follow list format with its title , when I click the title the info of its will show. How can I do it? My code: $(document).ready(function(){ $.ajax({ type: "GET", url: "xml/tuyendung...

How to use LINQ with stored proc in SQL to output xml

I am new to LINQ. I would like to execute a stored proc using LINQ and output to an XML file. How would I go about this? DataContext db = new DataContext(); var mysp = db.sp; now what, I want to keep the xml structure in the sp, currently I am running the sp without for XML auto, but my ideal results are with for XML auto in the proc....

Making JAXB generate an XML processing instruction

I am generating XML dynamically using JAXB. Now, I want to convert it to HTML using XSL. How can i include <?xml-stylesheet type="text/xsl" href=""> in the dynamically generated XML? ...

SignedXml.CheckSignature Performance Issue

I have an issue with checking the signature of an XML file using .NET 3.5. It all works fine, but randomly the performance is poor. Sometimes it's instant and yet at other times it can take maybe 10 or 15 seconds to return. I've checked the machine and nothing is going on to affect it's overall performance, and it's the same on differen...

How do I get kXML to work?

I'm trying to implement an existing XML parser: kXML. I ran into the following error: java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException at com.sun.midp.midlet.MIDletState.createMIDlet(+29) at com.sun.midp.midlet.Scheduler.schedule(+52) at com.sun.midp.main.Main.runLocalClass(+28) at com.sun.midp.main.Main.main(...

How to solve this error when using kXML for Midlet (java)

I downloaded kXML and included this in my Build Path (Eclipse). Now I'm running a simple Midlet and I get an error: java.lang.NoClassDefFoundError: org/kxml2/io/KXmlParser at clientlibrary.googlecalendar.TestParser.startApp(+8) at javax.microedition.midlet.MIDletProxy.startApp(+7) at com.sun.midp.midlet.Scheduler.schedule(+270) at ...

jquery read xml not function

clearly i must have overlooked something. here is my script, and below that is the data. $("#kenteken").blur(function(){ var sRegistrationNr = $(this).val(); var sChassisNumber = false; $.ajax({ type: "GET", url: "/activeContent/warrantyClaim/ajax-xml-response.php", data: "return=auto&kenteken="+sRegistrationNr, dat...

process RSS feeds with AJAX and javascript only

Hi Is it possible to connect to an RSS feed, retrieve the XML object then parse and display it all within client side javascript/ AJAX? Thanks, ...

xcode crash when parsing xml?

Hello all, I am developing an application in which i am getting xml from web.But some xml files are very large so when i parse xml in simulator it crashes the xcode also? do someone knows how to resolve this issue? BTW i know how to use NSXML parser only.So if this isn't work for me then please tell a step by step guide to any other appr...