|
Hello Sir,
Thanks For Reply.......
Here iam having....
name.list (element)
name(attribute)
name (attribute)
Two Attributes as Same ....I have to read this in Data set and send to SQLSERVER2005....
G.V.KISHORE
SOFTWARE ENGINEER
NUNET TECHNOLOGIES
-- modified at 1:42 Monday 19th June, 2006
|
|
|
|
|
Hi Kishore,
Small note (I am not Sir, but lady ).
Sorry, but I didn' t understood the question.
Can you explain it differently, or provide some more details
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Hi
I am using NDOC to create documentation on my project. I have added XML comments to my C# classes.
for a code sample as given below I am getting XML documetation warning:
/// if (parents != null && parents.Count > 0)
/// {
/// }
For line 1, I get warning "warning cs1570: badly formatted XML, a name was started with invalid character". When I click on the warning it takes me to '&&'.
Can anyone please tell me what is the syntax for && in XML?
Thanks for your help.
|
|
|
|
|
|
I need in my application to check if the data structure is correct in XML file which I read. How can I do that?
Only message if it`s correct or not I need.
Thanks
|
|
|
|
|
Every DOM object I've ever used has a parse function that will throw an exception or spit out an error if your XML is malformed. Unfortunately, determining well-formedness through exceptions is poor programming form.
The only better way I know to do this is with a full parser. As the parser is parsing, it should be able to tell you as soon as it finds a problem without throwing an exception, at which point you know your file failed. A complete run with no exceptions means your XML is good and adheres to any schema you've specified.
|
|
|
|
|
Write a schema for your structure that you can validate against.
Visit BoneSoft.com
|
|
|
|
|
I have tried DOCTYPE declaration internally and externally but it did not work in InternetExplorer6.(Its not showing an error eventhough the document is not according the DOCTYPE declaration.
Please tell me how to declare DOCTYPE and check the xml file according to DOCTYPE declaration.
ThankYou
KIRAN
|
|
|
|
|
hi
i am developing the web application in which i have to update the xml
Again and agian . What should i use tp update the xml here the code
try
{
XmlDocument xdoc=new XmlDocument();
xdoc.Load(Server.MapPath("MyFile.xml"));
XmlDocumentFragment docFrag=xdoc.CreateDocumentFragment();
XmlNode xmlnode = xdoc.DocumentElement.FirstChild;
XmlNode Query,MappingNode;
xmlnode.RemoveAll();
// if(xdoc.DocumentElement.Name.ToString().Equals("Query"))
{
for(int index=0;index<lstbxmap.items.count;index++)
{
="" values="" to="" be="" insert="" in="" xml="" at="" specific="" position=""
="" string[]="" temp="LstBxMap.Items[index].Text.Split('-','-','">','#');
string TemplateCol=temp[0].ToString();
string TableName=temp[4].ToString();
docFrag.InnerXml="<"+TemplateCol+"/>" ;
XmlNode CuurentNode=xdoc.CreateNode("element",TemplateCol,"");
xdoc.CreateElement(TemplateCol);
XmlAttribute AttributNode=xdoc.CreateAttribute("attribute","Address","");
AttributNode.Value=LstBxMap.Items[index].Value;
xmlnode.AppendChild(CuurentNode);
xmlnode[TemplateCol].SetAttributeNode(AttributNode);
xdoc.Save(Server.MapPath("MyFile.xml"));
}
}
}
catch(Exception ex)
{
ex.ToString();
}
PLease help me for updating the xml file using this code
|
|
|
|
|
try
{
xdoc=new XmlDocument();
xdoc.Load(Server.MapPath("MyFile.xml"));
CreateXmlTableElement();
string LastStoredProcName="";
for(int index=0;index<lstbxmap.items.count;index++)
{
=""
="" string[]="" temp="LstBxMap.Items[index].Text.Split('-','-','">','#');
string TemplateCol=temp[0].ToString();
string MapValueLOC=temp[1].ToString();
string StoredProcName=temp[5].ToString();
int flag=0;
CharEnumerator Characters= StoredProcName.GetEnumerator();
while(Characters.MoveNext())
{
if(Characters.Current.Equals('$'))
{
flag=1;
break;
}
flag=0;
}
if(flag==0)
{
if(!StoredProcName.Equals(LastStoredProcName))
{
CreateXmlTableElement();
}
LastStoredProcName=StoredProcName;
// create a attribute to add in table tag having value as a Stored procedure as name
XmlAttribute QueryAttribute=xdoc.CreateAttribute("attribute","Storedprocedure","");
QueryAttribute.Value=StoredProcName;
xdoc.DocumentElement.AppendChild(xmlElement);
// add attribute to the table tag
xmlElement.SetAttributeNode(QueryAttribute);
// create element MappedField showing the mapped field of Template column with
// Attributes of location
XmlElement mapField=xdoc.CreateElement("MappedField");
// Append to root node
// xdoc.AppendChild(mapField);
// create a attribute to add in MappedField element having value as location
XmlAttribute AddressLoc=xdoc.CreateAttribute("attribute","Address","");
AddressLoc.Value=MapValueLOC;
XmlAttribute Value=xdoc.CreateAttribute("attribute","Value","");
Value.Value=TemplateCol;
xmlElement.AppendChild(mapField);
// add Attribute to the element
mapField.SetAttributeNode(Value);
mapField.SetAttributeNode(AddressLoc);
xdoc.Save(Server.MapPath("MyFile.xml"));
|
|
|
|
|
Hi ,
Is there any way to export the .aspx file as XML file or vice varsa?
|
|
|
|
|
What are you trying to export? The source code or listing in the aspx? Are you trying to write XML output from an aspx? Do you want the code-behind embedded in XML? Please be more specific.
|
|
|
|
|
can anyone sujest me a method or show a sample code in whatever technology wich would help me load c++ objects from XML
like i would have
class A
{
int a;
int b;
A(int c, int d} {a=c; b=d;}
}
and xml <A a='2', b='3'></A>
and in result i would get A a = new A(2,3).
and also i would later on want to save my objects to xml again
-- modified at 13:48 Saturday 3rd June, 2006
|
|
|
|
|
If all your class variables are structures and not classes ( I mean int, double, float unlike CString, CList ) you can save the size of each variable in the XML file and then when you read it then just go over all elements and copy them to the class at the write position.
You should also save the type of the variables.
Something like this:
<A>
<a Size="4" Type="Int32">2</a>
<b Size="4" Type="Int32">3</b>
</A>
When you want to copy the objects from the XML you'll have to convert the string to the desired type and then copy the object to the write position in the class.
something like this:
int offset= 0;
int XMLValue;
int XMLVarSize;
A obj = new A();
Foreach Node In Nodes
{
memcpy( (LPBYTE)obj + offset, &XMLValue, XMLVarSize);
offset += XMLVarSize;
}
Good luck
Eran Aharonovich (eran.aharonovich@gmail.com )
Noviway
|
|
|
|
|
I have a web spider once it finds a page I need to convert that page into XML, it can be any page with many different formats. Is there a component I can use for that?
Does anyone know a really nice and fast way to do it?
Greetings
|
|
|
|
|
Um... HTML is a subset of XML. Just by the mere fact that you're getting HTML from the site, you already have XML. Are you trying to use a certain portion of it? Are you worried about the well-formedness of the HTML? Where are you having the problem?
|
|
|
|
|
Stephan Samuel wrote: HTML is a subset of XML
No HTML is not a subset of XML. XHTML is XML. HTML is not XML.
|
|
|
|
|
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
|
|
|
|