Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
cutever
Starting Member
32 Posts |
Posted - 2002-09-17 : 23:18:38
|
| Do have any method that can pass/write Parameter(Record/Data) direct into the XML-Document without using XML template or connect into the database?XML Template<?xml version="1.0" ?><ProductList xmlns:sql='urn:schemas-microsoft-com:xml-sql' sql:xsl='Products.xsl'> <sql:header sql:nullvalue='NoCategory'> <sql:param name='CategoryID'>NoCategory</sql:param> </sql:header> <sql:query xmlns:sql='urn:schemas-microsoft-com:xml-sql'> If (@CategoryID is NULL) Select ProductID, ProductName, UnitPrice From Products For XML Auto, Elements Else Select ProductID, ProductName, UnitPrice From Products where CategoryID = @CategoryID For XML Auto, Elements </sql:query></ProductList>Normal XML<?xml version="1.0" encoding="utf-8" ?> <?xml-stylesheet type="text/xsl" href="Products.xsl"?><ProductList><Products><ProductID>1</ProductID><ProductName>Chai</ProductName><UnitPrice>18.0000</UnitPrice><CategoryID>1</CategoryID></Products><Products><ProductID>2</ProductID><ProductName>Chang</ProductName><UnitPrice>19.0000</UnitPrice><CategoryID>1</CategoryID></Products><Products><ProductID>3</ProductID><ProductName>Aniseed Syrup</ProductName><UnitPrice>10.0000</UnitPrice><CategoryID>2</CategoryID></Products></ProductList>VerEdited by - cutever on 09/19/2002 21:50:53 |
|
|
cutever
Starting Member
32 Posts |
Posted - 2002-09-19 : 21:53:47
|
| Please ~~~~~~~~~~~~~ help ~~~~~~~~~~~~~!Ver |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-09-19 : 22:26:04
|
| Did you look in Books Online under "XML"? sp_xml_preparedocument? Or the SQL Server XML section on the SQL Server homepage:http://www.microsoft.com/sql/techinfo/xml/default.aspYou didn't provide enough information about your problem for any of us to help. |
 |
|
|
cutever
Starting Member
32 Posts |
Posted - 2002-09-19 : 23:26:54
|
| I knew about sp_xml_preparedocument. However, I want to work without using SQL database.Actually, I want to design a Customer Interface, which I can add a new customer detail on it. After submit, the customer detail will add into XML Document directly without passing into SQL database.Before Insert<root><Customer CustomerID="1" CustomerName="AAAAAA" Tel="123-123456"/><Customer CustomerID="2" CustomerName="BBBBBB" Tel="456-789456"/></root> Customer InterfaceName: CCCCCCTel: 999-875421Click --> SubmitAfter Insert<root><Customer CustomerID="1" CustomerName="AAAAAA" Tel="123-123456"/><Customer CustomerID="2" CustomerName="BBBBBB" Tel="456-789456"/><Customer CustomerID="3" CustomerName="CCCCCC" Tel="999-875421"/></root>I think this can done by using either ASP or HTML . Could you please provide me some guidence. Thank You !Ver |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-09-20 : 00:39:16
|
Hang on a minute:quote: I knew about sp_xml_preparedocument. However, I want to work without using SQL database.
Ummmm, then why are you posting this question ON A SQL SERVER SITE?By the way, do you want to work with SQL Server or not?http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=20001Please don't cross post in the future.Edited by - robvolk on 09/20/2002 00:42:16 |
 |
|
|
|
|
|
|
|