Web.config overwritten - web-config

I have a web.config for my website. I just made a web service which likes to overwrite the previous one. From what I can understand I need an xml transform here. I have read several sites and I am confused as how to complete this. One reference. Would love some insight, thanks in advance.

If you want to add or change something in web.config you don't need any XSL(T) because your output format is still XML.
Transformation (XSLT) is mainly for presenting XML data in different format.
What yo need is basic XML editing functionality. Parse to DOM, add/change nodes, save.

Related

modify a template PDF using iTextSharp server side

So I'm brand spanking new to iTextSharp and I know I have quite a bit of reading ahead of me but in an attempt to shave a bunch of time off a relatively trivial task I thought I reach out the stack brain-trust.
I have a very simple goal: Starting with a template pdf, I need to create new pdf with a few of the characters changed. We're talking single characters on each page. I don't need a detailed answer complete with code (although that'd be awesome) so much as a general list of tools and api's I'm going to need.
The data I need will already be in a db which I could output to xml files if need be.
So far it looks like my template will need the "editable" characters tagged somehow (not sure how to do that yet) and using PDFStamper I can modify the copy. Is that the right path or is there a better way?
Thanks for any insight.

browse file path spring webflow

I am currently working on a spring webflow application. In this project there are certain entities that point to a document that contains more information about that entity. However sometimes this document is not provided. In that case the user must be able to research the file for himself.
I need a simple way to let the user search a file and then save the filepath of the selected file into the database.
For most of our components we use richfaces but I don't really like the richfaces <fileUpload> because it's too big and too complex. I have seen that icefaces and tomahawk provide nice solutions but our application is limited to richfaces.
I thought of just using the normal:
<form:form> <input type="file> </form:form>"
but I don't know how I can get the information from that submitted form into my bean. I hoped that I could trigger an event once the file had been selected and then use a listener in my bean that would read the filename from the event. However I cannot find the syntax to do this (I don't even know if this is possible).
Can anyone help me? I know I can just do it with richfaces but I don't think that the client would like that enormous form to just select a filepath
why don't you use a simple jsp file upload?
http://www.tutorialspoint.com/jsp/jsp_file_uploading.htm

How can I parse and update local XML in iOS?

I am trying to do following task. I know we can read XML in iOS using a parser, but can we locally update the same XML?
1) Read XML from local resource folder.
2) Update XML. Locally change value of a tag.
Thanks for your help.
If you just need to read the XML you can use the native NSXMLParser. If you need to change the XML you can use TouchXML. You can get a good tutorial on how to use TouchXML here. Also interesting discussion of the various options here.

How to get data from XML files into business objects?

I need to build a view in my MVC 2 application that allows a user to upload an XML file. The XML files will conform to an XSD. I need to parse the XML and extract data to populate C# objects that will then be sent off to a web service.
My question is...since I know the exact "format" of the XML files, because of the XSD, is there some easier way to "move" the data in the XML files into my business objects?
I read about some Linq-to-XSD project, but it appears to have been abandoned. Linq-to-XML doesn't seen very helpful, since I still have to "walk" through the entire XML document to get all the data.
Surely there is an easier way?
http://linqtoxsd.codeplex.com/
here is a linq to xsd project on codeplex
http://www.codeproject.com/KB/linq/LINQ_to_XSD.aspx
another on code project
http://www.hanselman.com/blog/LINQToEverythingLINQToXSDAddsMoreLINQiness.aspx
and scott hanselmen talks about this. Between these links(no pun intended) you should be alright

iPhone RSS Reader -- parseXML won't Load some XML feeds

I am using the SIMPLE RSS reading example found at http://theappleblog.com/2008/08/04/tutorial-build-a-simple-rss-reader-for-iphone/
It uses parseXML to load the RSS feeds.
Here is the problem I am having. For the following RSS feed example, I am having trouble getting it to load the feed. Comes up with an error that it cannot connect. However on my Mac RSS Reader it works fine, so I know the link is good.
Any ideas on why it cannot load this particular feed but it can load others fine?
http://www.okstate.com/rss.dbml?db_oem_id=200&media=news
Thanks.
I've just released an open source RSS/Atom Parser for iPhone and hopefully it might be of some use.
I'd love to hear your thoughts on it too!
In my experience, HTML markup causes an RSS parser to fail in most cases. I've experienced a problem like this with a lot of parser classes I've come across (in search of the ultimate one, which I didn't find)
My guess is that entities such as
&#39;s
are responsible for your crash. That was usually the case with my crashes. This also lead to my decision to create a 'proxy server' to pre-parse the XML before sending it to the iPhone (which gives me the advantage of caching, scaling, and some other stuff). I do believe there are solid solutions out there, but is always difficult writing a parser for so many RSS implementations.
P.S: W3C validates this feed as 'valid', so it really is 'our' problem..
Your problem could lie with:
Unicode characters (i.e. I see some o's with two dots above them in the feed)
The code you have doesn't respect CDATA sections correctly
To find out which is the case, save the feed file to your local disk and load it via your code to make sure the error happens.
Do a binary search on the file to find out if a particular RSS entry is causing the problem (i.e. remove all but the first rss entry and see if the problem exists. If it does, then the problem is there, if it doesn't put half the rss entries back in the file and repeat)
I've been experiencing a similar issue. I haven't yet pinned down the answer, but I've noticed that RSS 2 tends to parse more successfully than the rest.
There are many RSS feeds that contain invalid XML, usually because they were hacked together on the server side using HTML templates by somebody who didn't understand XML. I've seen improperly escaped (or non-escaped) HTML post contents, missing close tags, badly nested tags, and so on.
If you want to be able to parse arbitrary feeds, you have to clean up bad XML. The usual way is to use the "htmlTidy" library, which is included in the OS. This can clean up XML as well as HTML.
This example you're following uses NSXMLParser -- I have no idea why. It's a lower-level API and it doesn't support tidying. I would suggest using NSXMLDocument instead. There's a flag in that API that will tell it to use tidy when parsing the XML. This API also returns you the XML as a handy tree of elements that's easy to work with.