|
led mike wrote: No HTML is not a subset of XML. XHTML is XML. HTML is not XML.
True, and I stand corrected, but if you've got non-XHTML HTML, good luck loading it into anything other than a browser. Luckily, many modern sites deliver XHTML.
I don't know of anything that converts HTML to XHTML, but I'm sure it's been written. Writing one yourself is an interesting regex exercise that'll be left to the reader.
Short of that, there's always running string processing routines on the HTML and whacking the results into an XML DOM. Seems like it'd be an extra step in many situations, though.
|
|
|
|
|
Stephan Samuel wrote: I don't know of anything that converts HTML to XHTML, but I'm sure it's been written.
There have been attempts. Last time I checked ( 18 months or so), I was unable to find anything that actually worked on "real" HTML. In other words it worked depending on the HTML so... sometimes.
|
|
|
|
|
Yep! I found some components but I couldn't fine one that worked all the time... They worked for simple scenarios but complex scenarios they didn't..
|
|
|
|
|
Not true, there's a lot of tags that do not respect XML format like "br" "img" "input" and you are not force to close a tag in HTML you can leave it open if you want, that is where I am having my problem...
Thanks for the reply
|
|
|
|
|
HtmlTidy [^]will read in badly formed html and can chuck out well-formed xhtml for you. You may be able to use either P/Invoke or if you prefer you can use the command-line version. I havn't investigated.
HtmlTidy is recommended by the W3C for tidying up code and as far as I know it's the only one that people accept works almost all of the time. In fact I'm suprised you havn't come across it.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hi,
You can try this:
HTML TO XML
It's free.
Eran Aharonovich (eran.aharonovich@gmail.com )
Noviway
|
|
|
|
|
Hello,
Let say I have the following XML file :
<Patients>
<Patient>
<ID>100</ID>
<NAME>Sarah Readings</NAME>
<DESC>flu</DESC>
<FORMULA>
<PARAM>panadol</PARAM>
<PARAM>linsep</PARAM>
</FORMULA>
</Patient>
</Patients>
I would like to display this data in a DataGridView table. Normally I would load it to a DataSet and map it to a DataGridView. However, as the node <FORMULA> would have multiple children nodes <PARAM> this could not be done.
I imagine the output table would have two rows for this single record. With each row having the same identical <ID>, <NAME>,<DESC> value, but different <PARAM> value.
But I am not really sure. Could anyone suggest how to display this in correct way in DataGridView ? or any article sources that might help ( does this have anything to do with normalization) ?
Many thanks and regards,
Sharvie
|
|
|
|
|
Hi ,
please i want to know what is XML ?? & when can we use it & why ??
i know this is so stupide but i really need to know that stuff because i have heard abt XML in DataSet & .config files & & &
and i thing that it is very very important so i have to know it & to good understand it
please if you want to help me send me courses or vedios that explain what is XML ...
this is ma e-mail you can add it to better contact me :
karat_man1@hotmail.com
thank you very much for your help
try to be good if you can't be the best
|
|
|
|
|
|
HI ALL I AM SAVING FILES PATHS IN AN XML FILE BUT THE PROBLEM COMES WHEN THE FILE NAME CONTAINS "&" SIGN.. THE XML FILES GIVES ERROR THAT WHITE SPACE IS NOT ACCEPTED AT THIS PLACE
SO ANYBODY PLZ TELL ME HOW CAN I GET RID OF THIS PROBLEM
LOOKING FORWARD FOR HELP
REGARDS,
|
|
|
|
|
You can use CDATA to handle "&". However, you need to post some code to demonstrate exactly what you are trying to do.
|
|
|
|
|
sir i dont know much about xml i m just using to save data from C# and then use this data to display in a web page...
so the sample code is something like this
< data >
< cluster label = cricket >
< document id = 1 > c:\cricket.txt < \document >
< document id = 1 > c:\hockey.txt < \document >
< document id = 1 >c:\hockey & cricket.txt< \document >
< \cluster >
< \data >
<\pre>
looking forward for help
Regards,
-- modified at 13:56 Thursday 1st June, 2006
|
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
<data>
<cluster label="cricket">
<document id="1"><![CDATA[c:\cricket.txt]]></document>
<document id="2"><![CDATA[c:\hockey.txt]]></document>
<document id="3"><![CDATA[c:\hockey & cricket.txt]]></document>
</cluster>
</data>
|
|
|
|
|
thxx alot sir it is working now
|
|
|
|
|
Hi
i opened the xml file and then after updating when i want to save it .It gives me Error
See the code
try
{
XmlNode xmlnode;
XmlDocument xdoc=new XmlDocument();
xdoc.Load(@"C:\VirtualDirectory\XmlApplication\myfile.xml");
XmlDocumentFragment docFrag=xdoc.CreateDocumentFragment();
docFrag.InnerXml="<add>this to it";
xmlnode=xdoc.DocumentElement.FirstChild;
xmlnode.InsertAfter(docFrag,xmlnode.LastChild);
xdoc.Save(@"C:\VirtualDirectory\XmlApplication\myfile.xml"); // Here it gives Error
}
catch(Exception ex)
{
ex.ToString();
}
|
|
|
|
|
Your code appears to be okay. However, your error may be based on your XML document structure. You need to post the error message!
Also, if you are using ASP.NET, you need to give ASP.NET the permission to write the file to the host server's file system.
-- modified at 15:06 Wednesday 31st May, 2006
|
|
|
|
|
Hi i am new developer for web application
In my web i want to update the existing xml file again and again for that i have some queries
1) What should i use for reading and writing the xml file
2) How we can add a new node/element in xml at perticular parent tag
-- modified at 3:20 Wednesday 31st May, 2006
|
|
|
|
|
sandeep akhare wrote: 1) What should i use for reading and writing the xml file
Which Language are you using
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Thanks for replying me i am using ASP.NET in which i am using C#
|
|
|
|
|
try this link
http://www.c-sharpcorner.com/Tutorials/ReadWriteXMLTutMellli21.asp
Regards
Shajeel
|
|
|
|
|
Thnak you very you solved my problem
|
|
|
|
|
Personally, I'd use something like SkeletonCrew[^] to build an XML serializable model, so that you can program against objects that mirror your XML structure. Deserialize the XML to objects, make whatever changes you need to do, and then serialize it back out to XML. Much quicker and easier than trying to do inserts with the XML DOM, and more flexible than being tied to DataSet, and it sticks to your model structure unlike the DataSet.
Visit BoneSoft.com
|
|
|
|
|
Hello,
I have an XML file of some network topology. The network elements are nested within each other. I want to read that XML file into a newly created Access databasea file. I dont have the schema of that XML file.
Thanks for Any help.
|
|
|
|
|
There may be an easier way, but the only thing I can think of is to build a little executable to process the XML and do the inserts for you. I'd use something like SkeletonCrew[^] to build an XML serializable model from your XML structure, so that you can program against objects that mirror your XML structure. It would make reading the XML data much easier. Then you just have to worry about your inserts as you work through the object structure.
I don't know of an existing tool that would do it for you, I'm affraid you'd have to build something to do it.
Visit BoneSoft.com
|
|
|
|
|
hi please anybody tell me how i can create xml file susing vb 6.0,its urgent
Thanks
|
|
|
|