xml

How to design storing complex object settings in an xml

I am trying to store custom settings for each objects state on the object itself, but I don't know how I can do this in an object-oriented way. So: One section in the xml file is: <ObjectType> which can be Blur, Sharpen, Smooth, etc. But say that Blur has additional properties to be stored only if the type is Blur, like: <BlurType>...

How to force visio to re-evalute formulas when an untrusted visio document is opened.

Hello Everyone, I have a module that creates a Visio file (VDX) outside Visio. According to the SDK this refers to 'untrusted' XML. I've created my xml file by copied the Masters from my stencil and then refer to them using an XML sparse file. In my sparse xml I override the shape's location and size this way: <Shape ID="154" Master="...

Xml attributes vs Xml inside properties?

Possible Duplicates: How to design storing complex object settings in an xml XML attribute vs XML element What's the criteria to use when deciding whether something should be done like this: <Blur Type="Gaussian", Amount=5></Blur> or <Blur>Gaussian, 5</Blur> If it's #1, then what would you put inside the brackets? Also ...

How do I detect a HTTP response, parse the xml and save to a NSString?

I've been trying to figure this out for weeks and i still get nothing. I am using the ASIHTTPRequest and ive successfully sent the data to a server and now I need to get the response XML,parse it and save the elements to each labeled NSString so I can post it to the server. Does anyone have an idea on how to do this? ...

What is the fastest way to load an XML file into MySQL using C#?

Question What is the fastest way to dump a large (> 1GB) XML file into a MySQL database? Data The data in question is the StackOverflow Creative Commons Data Dump. Purpose This will be used in an offline StackOverflow viewer I am building, since I am looking to do some studying/coding in places where I will not have access to the in...

XSL to get exactly the same html code as in the XML element

XML/XSL newbie here, so please forgive my ignorance. This is the xml input given to me: <entry> <desc> <p>Lorem ipsum <a href="http://www.google.com"&gt;dolor&lt;/a&gt; sit amet.</p> <p>Lorem <strong>ipsum</strong> dolor sit amet.</p> </desc> </entry> I must write an XSL to get this result: <p>Lorem ipsum <a h...

C#, insert strongly typed object into XML Document as Element

I have an XML document that contains the following structure: Its more or less a collection of Events: <Events> <Event> <DateTime></DateTime> <EventType></EventType> <Result></Result> <Provider></Provider> <ErrorMessage></ErrorMessage> <InnerException></InnerException> </Event> </Events> In C# I have a pe...

SQL: How do I select an XML element from within a larger variable of type XML?

I am sending multiple different data items to a stored procedure in an XML variable. The signature of the function goes something like this: CREATE PROCEDURE MyProc @id INT, @xml xml AS BEGIN .... END and the XML looks somewhat like this: <Root> <SampleTime>2009-02-05 13:25:43</SampleTime> <Gizmo1> <Voltage>34.1</Vol...

PHP SimpleXML doesn't preserve line breaks in XML attributes

I have to parse externally provided XML that has attributes with line breaks in them. Using SimpleXML, the line breaks seem to be lost. According to another stackoverflow question, line breaks should be valid (even though far less than ideal!) for XML. Why are they lost? [edit] And how can I preserve them? [/edit] Here is a demo fil...

How do you know which XML parameters a Spring configuration tag has?

I was just reading an article that showed the following Spring Security XML configuration: <authentication-provider> <password-encoder hash="sha" /> <jdbc-user-service data-source-ref="dataSource" /> </authentication-provider> I wondered if password-encoder could take some combination of parameters that would make it use SHA...

XPath : Get nodes where child node contains an attribute

Suppose I have the following XML: <book category="CLASSICS"> <title lang="it">Purgatorio</title> <author>Dante Alighieri</author> <year>1308</year> <price>30.00</price> </book> <book category="CLASSICS"> <title lang="it">Inferno</title> <author>Dante Alighieri</author> <year>1308</year> <price>30.00</price> </book> <b...

Is it bad to store JSON on disk?

Mostly I have just used XML files to store config info and to provide elementary data persistence. Now I am building a website where I need to store some XML type data. However I am already using JSON extensively throughout the whole thing. Is it bad to store JSON directly instead of XML, or should I store the XML and introduce an XML pa...

Converting a downloaded query xml string to a usable xml document in vb2005.net

Converting a downloaded query xml string to a usable xml document in vb2005.net i would like to convert a image query, found here http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=xxxxxxx&amp;query=cars in vb2005.net to the xmldocument which i can then cruise around and grab the data with, current code using the web...

Best way to handle Facebook Error Response Codes using Server Side Java?

Hello there, Don't know if this particular forum is the best place to ask this question... What is the best way to handle error response codes generated from Facebook REST API calls using server side Java? For example, if in a deployed app, a person calls Friends.get: http://wiki.developers.facebook.com/index.php/Friends.get The fo...

Webmethod parameter stay null

Hello, I am developing an iPhone application which sends SOAP messages to a .NET Webservice to call several WebMethods. These methods getting data out of a database and return this in a SOAP message back to the iPhone. When i sent a SOAP message that calls the WebMethod without any parameters it works just fine. But when I pass a para...

put Custom Class Array into a dataset or XML (C#)

I am making a small card game which required a high score list that is saved to an external file, and loaded from it at the begining of each each game. I wrote an xml file in this format bob 10 3:42 21-09-09 I have figured out how to create a dataset, use dataset.readxml, to load the xml into it, create a row and then write each row...

<any> in an XSD does not work?

Hi, I'm trying to create an xml-schema (xsd) to validate an xmlfile. <a> <b> <c>...</c> <d>...</d> </b> <b> <c>...</c> <e>...</e> <d>...</d> </b> <a> 1 a-element. Multiple b-elements, that have some content. I want to validate that a is present in the file, and 1 or more occurances of ...

getting more informations from sax validator

Can i get for example the node structure or something like this from the validator? Something like a listener or an handler. The exception is not enough. I have to select the node where the error occured. Thats what i build so far. def factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI) def schema = factory.newSchema...

Non-Blocking method for parsing (streaming) XML in python

I have an XML document coming in over a socket that I need to parse and react to on the fly (ie parsing a partial tree). What I'd like is a non blocking method of doing so, so that I can do other things while waiting for more data to come in (without threading). Something like iterparse would be ideal if it finished iterating when the r...

C#, XML Query Question

I have tons of XML files all containing a the same XML Document, but with different values. But the structure is the same for each file. Inside this file I have a datetime field. What is the best, most efficient way to query these XML files? So I can retrieve for example... All files where the datetime field = today's date? I'm usin...