Im trying to generate a xml from a html (url). The html website have a formulary that i want to get into a xml archive, but its too long and im searching a way to do it easier.
There is a method to generate a xml with all the fields, etc, from a html?
you can also use an html parser and print out the objects / array as xml
try this: http://sourceforge.net/projects/html2xml/
You can try the free dotnet-classlibrary SgmlReader that can load html into a xmldocument. This in turn can be saved as xml.
Related
I need to be able to parse HTML snippets in an event-driven way. For example, if the parser finds a HTML tag, it should notify me and pass the HTML tag, value, attributes etc. to a delegate. I cannot use NSXMLParser because I have messy HTML. Is there a useful library for that?
What I want to do is parse the HTML and create a NSAttributedArray and display it in a UITextView.
YES you can parse HTML content of file.
If you want to get specific value from HTML content you need to Parce HTML content by using Hpple. Also This is documentation with exmple that are is for parse HTML. Another way is rexeg but it is more complicated so this is best way in your case.
I have HTML page that I created using xslt and an xml file. now In this html file, there is the option to change some values, so after these changes I want to generate xml content with these changes. How can I do that? Is there an easy way?
It seems you are looking for somethig like XMLForm :- http://www.datamech.com/XMLForm/
I have an XML file that I've transformed with xsl and loaded into a browser as html. That html is editable using a rich text editor by the user. When they're done I need to transform their html edits back to the original xml document.
One solution I've found is using ASP: http://www.w3schools.com/xsl/xsl_editxml.asp
But I'm using Apache and I don't have ASP installed, and I'm wondering if there is an easier/better way to do this without using ASP.
Or is ASP the only way?
Thanks =)
The solutiton that you found doesn't do what you describe. It only presents the data from the XML as a form, and lets the user edit the values. That's not very complex, and you can do that using pretty much any other server side language, like PHP for example.
What you describe, on the other hand, is quite complex. It involves examining the XSL and the HTML to identify the parts of the HTML code that was created using specific XML data, so that changes can be reflected back. That's not something that is done with a simple ASP script like that.
If you design an XSL transformation for both directions, XML to HTML and HTML to XML, comparing the source XML and resulting user XML should be a much easier problem to solve.
I am using LINQ-to-XML. I am building a small program that helps parse HTML. I'd like to save the HTML tags into an XML file, but I don't want the XML file to check the validity of the entered HTML elements.
How can I just entere a simple string literal (a pretty long one)?
Maybe using a CDATA construct could help you out, see w3schools.com
The assumption is the webpage is coded with correct tags. How can I Convert it to the XML file? I think the most webpages can be viewed as dom tree...How can I convert it to XML file?
JTidy reads HTML and presents it as a DOM. Once you have your HTML as a DOM you should be able to process it and write it out as XML.
To output a DOM, see the example code here and the XMLSerializer in particular.