xml

Convert image (jpg) to base64 in Excel VBA?

I need to convert an image inside Excel (or through VBA) to base64 (in the end I will make XML output). How can I do this? Do I need to make a reference to DOM? I´ve been reading this question but it only works for text strings not images... Does anyone have any code that I can see? ...

Returning XMLReader

I am trying to return an XMLReader from a data access class that calls a stored proc to run a FOR XML query. The problem is, I can't call close() on the sql connection when I return the xmlreader or the reading will terminate. The class that calls for the xmlreader doesn't know anything about a sql connection so it can't be in charge of ...

What is the fastest way to remove nodes from a large XML file using .net

I am working working with very large XML files (100s of MBs). The tree is fairly simple <items> <item> <column1>ABC</column1> <column2>DEF</column2> </item> <item> <column1>GHI</column1> <column2>KLM</column2> </item> </items> I need to parse this document, and remove some <item> elements. So far, the best peer...

Correct way to Switch between Dev, Test and Prodcution Services in Builds

I have a client side app (WPF) that hits my web services. When I am running in dev I want to hit the Dev version of these web services. When I am running in the Test environment I want to hit the test version of the services. Like wise for production. Since these values are in my app.config file what is the best way to switch between...

exporting matlab class object (or struct) into java object of similar class using xml

I have similar matlab and java classes: public class myClass { double[][] v1; String v2; } I need to export the matlab object, whos struct is: obj = v1: [2x2 double] v2: 'abc' into Java. Is there a common way to do it? I can also save the struct as xml file. Is there any parser that can do: myClass obj = SomeParser( xmlFile...

AS3 XML, nodeName with attributes comes up blank

I've tried many different ways of accessing the name of an attribute, but just can't get it working. The current Function: protected function applyProperties(_axml:XML):void { var list:XMLList = _axml.properties; var list2:XMLList = list.attributes(); for( var i = 0; i < list2.length(); i++ ){ trace(list2[i].nodeName.toStr...

What is a good library for generating arbitrary XML from Java?

I need to generate a number of XML documents from Java objects. The objects are deep ORM mapped objects, and the XML documents are for a search index (a la Lucene). I want to be able to create a configuration file and feed it a Java object and have it spit out the XML specified in the configuration. Ideally the configuration would con...

XStream: Collapsing XML hierarchy as I parse

I have an XML document (generated by Adobe XFA forms), that contains data like the following: <Position> <PositionBorder> <Title/> <StartDate/> <EndDate/> </PositionBorder> </Position> Since this file is defined elsewhere, I am not at liberty to change the format of the XML that I get. In my Java code, I cr...

What are the advantages and disadvantages of using a search engine as a key value store?

Given a search engine like Lucene and a set of XML documents which need to be fully preserved, what are the advantages and disadvantages of using the search engine as key value store for returning XML doucments given a unique primary key which each document contains? ...

Simple way to add escape characters to a string

Does anyone have a simple tool that can convert a non-escaped string to an escaped string? For example, I'm trying to paste the following data into a Java String datatype: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> I manually have to add the slashes: <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?> Then...

How to setup WPF parent/child listboxes

I need selected item of Listbox1 to provide XmlDataprovider source for second Listbox. Listbox1 uses: <XmlDataProvider x:Key="CategoryXML" Source="C:\Category.xml" XPath="category" /> Ex: Category.xml <?xml version="1.0" encoding="ISO-8859-1"?> <main> <category> <name>Local</n...

Open xml file with different extension using loadXMLDoc

I've got a file with an extension of .abc which is an XML file and I am processing the XML using XSL. I open an HTML page which loads the XML using loadXMLDoc like this: xml=loadXMLDoc("Example.xml"); xsl=loadXMLDoc("Example.xsl"); The problem is I need to open "Example.abc" not "Example.xml". If I try: xml=loadXMLDoc("Example.ab...

how to transform XML files before processing xinclude

Hi, I have numerous XML files that are organized into different directories. I need to combine them and transform the result using XSLT. So far, I have already done this except for one problem: some XML files need to be transformed first before it can be included into the result. xinclude seems to ignore the xml-stylesheet declaratio...

How to publish applications dependent on external files

I have an application that uses an .xml file to load information about objects (Such as strings for name, location etc.. nothing too complicated). Currently when i use the application the .xml file is stored in: "/bin/debug" of my project folder. If i was to release my application as a standalone .exe how would i go about ensuring ...

PHP DOMDocument->loadXML with XML containing ampersand/less/greater ???

I'm trying to parse an XML string containing characters & < and > in the TEXTDATA. Normally, those characters should be htmlencoded, but in my case they aren't so I get the following messages: Warning: DOMDocument::loadXML() [function.loadXML]: error parsing attribute name in Entity ... Warning: DOMDocument::loadXML() [function.loadXML]...

How to create HTTP POST Request Body content with WCF REST (Starter Kit)

I'm integrating an app with ZenDesk. They have a REST API. I need to send POX in the request body. I'm using the WCF REST Starter Kit. How do I programmatically add my xml to the request body? Here's my unit test: [Test] public void Can_create_user() { // Arrange http = new HttpClient("...

in velocity can you iterate through a java hashmap's entry set() ?

Can you do something like this in a velocity template? #set ($map = $myobject.getMap() ) #foreach ($mapEntry in $map.entrySet()) <name>$mapEntry.key()</name> <value>$mapEntry.value()</value> #end ...

shell script to find&replace section in xml

Hi, Im have a xml config file called solrconfig.xml, it has this section in the middle of it: <!--############ BEGIN replication settings DO NOT EDIT ################################--> <requestHandler name="/replication" class="solr.ReplicationHandler" > <lst name="master"> <str name="replicateAfter">commit</str> <str name="replic...

Android: Parsing XML DOM parser. Converting childnodes to string.

Hello, Again a question. This time I'm parsing XML messages I receive from a server. Someone thought to be smart and decided to place HTML pages in a XML message. Now I'm kind of facing problems because I want to extract that HTML page as a string from this XML message. Ok this is the XML message I'm parsing: <AmigoRequest> <From></Fr...

Flex: Modifying valueOf XML for node where hasSimpleContent()==true using ActionScript

All I want to do is modify the text value of the XML corresponding to the CURRENTLY SELECTED node in the tree. Everything is a piece of cake except actually changing 'abc' to 'xyz'. [Bindable] public var xml:XML= <rootnode> Content A <parentnode Name="value" Attr2="4"> parent content1 <childnode Name="child"...