xml

How to loop through a set of XElements?

http://www.dreamincode.net/forums/xml.php?showuser=335389 Given the XML above, how can I iterate through each element inside of the 'lastvisitors' element, given that each child group is the same with just different values? //Load latest visitors. var visitorXML = xml.Element("ipb").Element("profile").Element("latestvisitors"); So no...

Trouble assigning a value to this variable.

Using this code I intend to populate the variables. http://www.dreamincode.net/forums/xml.php?showuser=146038 //Load comments. var commentsXML = xml.Element("ipb").Element("profile").Element("comments"); this.Comments = (from comment in commentsXML.Descendants("comment") select new Comment() { ...

How do I write a Lambda statement for this Linq to XML function?

I am working with this XSD file. The portion of the XML that is relevant to this question is here: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="https://wsmrc2vger.wsmr.army.mil/rcc/manuals/106-11" targetNamespace="https://wsmrc2vger.wsmr.army.mil/rcc/manuals/106-11" ...

how to parse an xml string in mysql?

in ms sql I have the following code: ALTER PROCEDURE [dbo].[xmlDictamen_Alta] @Xml text as begin declare @Id integer declare @DocumentoId numeric(18,0) declare @Descripcion varchar(300) begin set nocount on exec dbo.sp_xml_preparedocument @Id output, @Xml select @DocumentId = DocumentId, ...

how to parse an xml string in postgres

in ms sql I have the following code: ALTER PROCEDURE [dbo].[xmlDictamen_Alta] @Xml text as begin declare @Id integer declare @DictamenId numeric(18,0) declare @DocumentoId numeric(18,0) declare @Descripcion varchar(300) begin set nocount on exec dbo.sp_xml_preparedocument @Id output, @Xml select ...

Disable all checkstyle checks for a specific java package

Hi I have two packages namely com/mydomain/abc/delegate/xyz/jaxws/managed and com/mydomain/abc/xyz/jaxws/managed I require checkstyle to be disabled only for the second package as these holds proxy classes that are autogenerated. I use a suppression.xml as shown below <?xml version="1.0"?> <!DOCTYPE suppressions PUBLIC "...

how to use httphandler class to change SOAP namespace?

REF: http://stackoverflow.com/questions/4008703/creating-a-soap-proxy/4016687#4016687 How do I use HttpHandlers to create a proxy and change a SOAP request and response namespace? Example...change this (1 line) <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http:/...

Validating XML against XSD using Silverlight?

So I have been twiddling with a personal project to import my garmin gps data into a local database. The data lives in a GPX xml file, whose schema is defined by an xsd file. The idea is for the client to upload their GPX file, and the SL client would validate it before sending it to the server. But I ran into some issues here, first ...

XPath and Jabber-RPC

I'm trying to access the methodName element of an XML document using XPATH in Cocoa via the NSXMLElement object. This is the XML representation of element <iq type='set' from='[email protected]/jrpc-client' to='[email protected]/jrpc-server' id='rpc1'> <query xmlns='jabber:iq:rpc'> <methodCall> <m...

Is there a tool to generate a sample application configuration by analyzing a ConfigurationSection type and its attributes?

I am working on an application that has a large set of configuration values, modelled and organized through the .NET configuration types from the System.Configuration namespace (i.e. ConfigurationSection, ConfigurationProperty, ConfigurationElement, etc...). Several values are required and may or may not have defaults, while others are ...

C++ code to indent XML line

Hi. I am looking for C++ code to indent an xml line. I don't want to link with a library. I have my stream in one line like this <root><a>value_a</a><b>value_b</b></root> and I want to print it in a multi-line way (with tabs). <root> <a>value_a</a> <b>value_b</b> </root> does it ring a bell to anybody? ...

Split XML in PHP

I have a merged xml with a root element and multiple item child elements. Something like this <root> <item>test1</item> <item>test2</item> </root> What I want is an easy way to parse the xml and create an array of xml strings from the items. $arrXml[0] = '<item>test1</item>'; $arrXml[1] = '<item>test2</item>'; I'm looking for...

XML Parsing not working in IE

Hi All, I am trying to parse a XML file, it works perfectly in FF but dont in IE. Pls help debug this. The code is as follows. if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open...

XML validation using Java

I have the below code. Here i am entering my XML(xmlString) to be validated and the Schema(schemaString) in String format. Is there a way by which this can be taken up as XML files and be validated. ==================================================================== import java.io.StringReader; import javax.xml.XMLConstants; import ja...

Merging Xcode project files

There are often conflicts in the Xcode project file (Project.xcodeproj/project.pbxproj) when merging branches (I'm using git). Sometimes it's easy, but at times I end up with a corrupt project file and have to revert. In the worst case I have to fix up the project file manually in a second commit (which can be squashed with the previous)...

Copying and Renaming an Element from one XML file to another XML file in Java

I can copy a node from one XML file to another using "org.w3c.dom.Document.importNode(Node importedNode, boolean deep)" However, I can't seem to rename the Element I am copying. I have something like: File1.xml <SomeCustomNode randomAttribute="aValue" another="10/10/2010"> <Information> <Yellow name="banana"/> ...

Standardise on a XML reader methodology

In an open source project I maintain, we have at least three different ways of reading, processing and writing XML files and I would like to standardise on a single method for ease of maintenance and stability. Currently all of the project files use XML from the configuration to the stored data, we're hoping to migrate to a simple datab...

2 XML Imports - Database design

SQL Server 2008. Morning, If someone could offer their advice it would be very much appreciated. Currently I’m looking to import two XML files, Donation amount and Donation Maker. The Donation Amount file would comprise of an Amount field and a DonationMakerID, and the Donation Maker file would comprise of a Name field and Donation...

How can I insert an xml comment with Groovy MarkupBuilder?

I would like to insert comments into my xml document with a Groovy MarkupBuilder. How is it possible? ...

What is a good way to read this XML?

What is a good way to read this XML? Or maybe I can structure the XML differently. What I want is the process to be the main thing and then you could have any number of related process to follow. <Job> <Process>*something.exe</Process> <RelatedToProcess>*somethingelse.exe</RelatedToProcess> <RelatedToProcess>*OneMorething...