|
I've had no answers. I wouldn't be posting here if I had an answer to this. Pls can u help me out?
He who goes for revenge must first dig two graves.
|
|
|
|
|
That's not the way the site works. This is a volunteer site where people help out as and when they can. If you post a question in multiple locations, then answers to the question become fragmented making it harder for us to identify what's been said to you already, and making it next to impossible for somebody following a link in from a search engine to follow answers to a problem that they may be having just because you're impatient.
|
|
|
|
|
But i have posted this nowhere else. Of course i know how the site works!
He who goes for revenge must first dig two graves.
|
|
|
|
|
You've posted it in two places. Q and A, and here. The two aren't linked together.
|
|
|
|
|
Pete,
i went over to Q&A, and that wasn't me. Besides, the questions are quite different. He's trying to export to an XML file, while i'm trying to export data to a Typed XML Schema file. I can do the former, but have problems with the latter. I've seen the responses to that, and they aren't helpful to mine.
I humbly ask, pls is there any1 with a solution to my problem?
He who goes for revenge must first dig two graves.
|
|
|
|
|
|
No problem, Pete, just a misconception.
He who goes for revenge must first dig two graves.
|
|
|
|
|
Do you wish to create the schema as part of the xml production or is that defined already?
Without going near code, SQL Server has got various things in it to retrieve data in XML, using the FOR XML AUTO thing for instance. That is of course, presuming you're using SQL Server.
Regards,
Rob Philpott.
|
|
|
|
|
Rob,
Yes, i'm using SQL Server. The problem is that i'm supposed to pull several data from various tables, and the schema has been defined by my clients in one cumbersome XML schema file. The data includes names, addresses, sales agents (which could be multiple), contacts (phones and emails, which could also be multiple), and so on. So i'm supposed to bring all data relating to one person into an XML file.
That's my problem.
He who goes for revenge must first dig two graves.
|
|
|
|
|
Well, that could be a tricky thing to do depending on how the schema has been laid out. Probably the best approach is to see if you can use the FOR XML AUTO thing with appropriate joins to get your query response to validate against the schema, but then apart from that you might want to look at the XSD tool which could generate business objects from the schema which you'll have to populate manually through code.
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: but then apart from that you might want to look at the XSD tool which could generate business objects from the schema which you'll have to populate manually through code.
I'm sorry i don't know about this.
He who goes for revenge must first dig two graves.
|
|
|
|
|
Ouch. Your choices are either to serialize your different objects out to a temporary location and then use Xslt to convert them, or you create a super class that contains the values and serialize that. If I were you, I'd go with the Xslt approach.
|
|
|
|
|
Ouch. Harder than i thought.
Pete O'Hanlon wrote: Your choices are either to serialize your different objects out to a temporary location and then use Xslt to convert them
i'm sorry, how do i do this? U mean i should write the data into an xml file, then manually use the xsl tool to conform it?
He who goes for revenge must first dig two graves.
|
|
|
|
|
Write to several XML files and then use XSL to form it into one.
|
|
|
|
|
Cumbersome. We've got little time for pilot mode so i guess i'll try it.
Thanx a lot.
He who goes for revenge must first dig two graves.
|
|
|
|
|
|
Thanx a lot. I think LINQ will help us achieve it.
He who goes for revenge must first dig two graves.
|
|
|
|
|
I have done similar things before using an sql data adapter. This produces a seperate file for xml schema though. I'm not sure if this is what your looking for.
SqlCommand cmd = new SqlCommand();
cmd.Connection = new SqlConnection(@"cnnstring");
cmd.Connection.Open();
cmd.CommandText = "SELECT * FROM Table1; SELECT * FROM Table2";
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
ds.WriteXmlSchema(@"C:\dat.xsd");
ds.WriteXml(@"C:\dat.xml");
cmd.Connection.Close();
|
|
|
|
|
how Access to the default page other Webhost
Example http://codeproject.com
Results defalut.aspx
Example http://byethost.com
Results index.php
Please Help
|
|
|
|
|
Do you want to know what it will be called? Because you can't tell in advance. It could be "default.aspx", "index.html", "index.php" or something else, depending on the language it is written in.
Only going there will tell you - you can't determine the language in advance.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
That's a setting of the web server. There, you can define a list of "default" pages which is searched up to the first match, which is then sent to the browser. Typically, you will not see in the browser which page was sent to you. But in case of server redirect, you will see it.
|
|
|
|
|
Thanks for your answer
I want to make a robot spider, not in my site on other sites
|
|
|
|
|
In which case, by default, you don't need to know what the page is called up front - you can find that out once you reach the page. You hit the front page, and then start crawling out from that page. If you're hitting a site because you are following a link from another site, you could well find that you are in a page other than the default page anyway.
|
|
|
|
|
More tips
grateful
|
|
|
|
|