xml

How do I use XMLUnit to compare only certain parts of files?

How do I use XMLUnit to compare 2 or more nodes (of the same name) in 2 different files? I have 2 XML files that look like this: <SearchResults> <result type="header"> ...ignore this.... </result> <result type="secondheader">...ignore this....</result> <result>....data1....</result> <result>....data2....</result> <result>.......

How to automatically retrieve current adword spend from google

Does anyone know a guide or tutorial into how to access the Google adwords reports? I'm trying to pull in to my application the advertising spend per day (current to the time of checking or last Google update). I can't quite find the API docs or methods for getting the spend. Does anyone know of any good tutorials? Or can you point me ...

When do I need to use JSON and XML?

I know there are a lot of sources which explain this, but they just talk about storing key/value pairs in an array or in an object. I can't understand why or when should I do this, although I always use jquery's AJAX. As an example, if I make a forum when do I need this? Can someone give real world examples? The same goes for XML. It s...

MICROSOFT.XMLDOM -- selecting a node that contains a specific node

Here is an extract from the XML: <?xml version="1.0" encoding="utf-8"?> <usa_map_locator> <map_data> <state> <id>2</id> <link/> </state> <state> <id>3</id> <link/> </state> </map_data> </usa_map_locator> I need to assign a value to the link node for state 2 (or 3 or 4 or 5 and so on)...

Xpath function to remove white space

Hey everyone Im trying to use XSL and Xpath functions to remove all the white space from a XML attribute called name and make it lower case. At the moment i have something like <xsl:variable name="linkName"> <xsl:value-of select="normalize-space(name)"/> </xsl:variable> This removes the white space at the beginning and end but no...

Why do Excel and IE8 give an error when viewing XML with an ë in it?

Maybe this is an encoding issue? I can't imagine that you have to replace every non standard character. Example XML: <?xml version="1.0" encoding="utf-8"?> <client> <achternaam>Erriëns</achternaam> </client> With or without the first line doesn't matter. Error in IE8: The XML page cannot be di...

Can objects created with .net reflection be serialized?

Is it possible to serialize an object that is created through reflection? I get an error of "Unable to cast object of type 'testNameSpace.ScreenClass' to type 'testNameSpace.ScreenClass'" when attemping to perform the serialization of the object that was created through reflection. The error does not make sense since the types are ident...

Best practices when generating XML web services data for PHP

I'm currently using Fusioncharts Free in my project which requires XML to be in a specific format, both for the display of data and for the appearance of the chart. I have a PHP file called webservice.php which has many similar repetitions of the below: $address = $_SERVER['PHP_SELF']; ... if ($address == 'webService.php/fcf/last5pr...

Xml Attribute not showing up on ListBox - C#

I'm getting a null reference exception whenever it tries to add the packages titles info and other attributes but the attributes exist and the proper package is selected Heres the code: private void categorylist_listview_SelectionChanged(object sender, SelectionChangedEventArgs e) { XmlDocument LoadPackageList = new...

Validating XML parser for Flex/actionscript?

Is there a validating XML parser for flex/actionscript? The XML class verifies that it is well formed XML, but not that it follows the rules of the DTD. Java has a validating XML parser, but is there one for flex/actionscript? ...

Creating Database in ActionScript

I am beginner of AS3 and I want to make a xml file retiring and saving the data through as3 program without using PHP. ...

XML/SWF help needed

I'ld like to make a little swf application to use it on my XP desktop place. And I'ld like to run movies directly from this swf. So, I need to know parameters like movie name and subtitle name to parse it to the button link. And I thought that if I create an XML file to contain all data (1db for .avi,.mpeg etc and other from .srt,.sub ...

Parse Delphi Project File on C#

This may seem like an odd question, but I have my own reasons for this! I am trying to parse a Delphi 2009 project file (.dproj), which is an XML representation of the project. I Can load the document into an XmlDocument, but when I try and get to the units that are used in the project, SelectNodes gives me an empty list. An example of ...

delete XML node using javascript in firefox

Hi, Im trying to delete a node in XML file using Javascript. The used browser is Firefox. Im reaching the node which I want to delete successfuly, then Im trying delNode.ParentNode.RemoveChild(delNode) but when i went back to the xml file on my harddisk, the node was still there. I need to delete the whole node (not only children). If s...

How do you encode XML safely with ActionScript 3?

I'm capturing data from the user and writing it to an xml string like so: var myXml:XML = {userEnteredText} This is fine and dandy until the user gets cute with special characters like "& < >" etc. Illegal characters are also a problem like 0x19. Is there are method that will sanatize my xml and encode special characte...

How do you write to an xml file in win32 C++?

I would like to write a simple xml file using xmllite in win32 c++. the file will be saved over every time the user saves. How do I do this? I'd rather not include any new libraries for this... ...

wistringstream from an xml file to an integer?

const XMLDataNode *pointsNode = node->GetChildren().at(0); std::wistringstream pointsstrm(*pointsNode->GetInnerText()); pointsstrm >> loadedGame.points; This is code I've written to pull an int from an XML file and pass it into loadedGame.points (an int). However, this isn't working. It compiles but doens't give the right value. Why...

Using XML in SQL Server Reporting service + Textbox

I am having data in xml as column in my table. I am retriveing the value select * from customer But my customer column value looks like this <customer exception ="Sam"/> <customer exception ="Jam"/> I need to specify the first two letters of this exception in my sql reports textbox as (S,J) How can I achieve this in SSRS reports...

Java Inner Text (getTextContents()) Problem

I'm trying to do some parsing in Java and I'm using Cobra HTML Parser to get the HTML into a DOM then I'm using XPath to get the nodes I want. When I get down to the desired level I call node.getTextContents(), but this gives me a string like "\n\n\nValue\n-\nValue\n\n\n" Is there a built in way to get rid of the line breaks? I would ...

Create groovy xml with an "envelop" - add nodes in the middle of a xml structure

Hi all, (sorry for the weird title...) I want to use the groovy builder system to create a xml. My problem is that i want to have some kind of envelop around, which the user dont has to care about. An example: def builder = new groovy.xml.MarkupBuilder() builder.foo() { bar('hello') } this should create lets say <Something i...