473,770 Members | 6,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I create an XSD document based on an XML file content?

Is it possible to create your won XSD to use with .NET based on an XML
content?
For example the one below:

<?xml version="1.0"?>
<pcats:FuelsD oc
xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocat ion="NAXML-FuelPrice15.xsd ">
<pcats:Transmis sionHeader>
<pcats:Transmis sionId>20070604 0938</pcats:Transmiss ionId>
<pcats:Transmis sionDate>2007-06-04</pcats:Transmiss ionDate>
<pcats:Transmis sionTime>09:38: 19-06:00</pcats:Transmiss ionTime>
<pcats:Transmis sionStatus>orig inal</pcats:Transmiss ionStatus>
<pcats:Transmis sionSender>Apex Oil</pcats:Transmiss ionSender>
<pcats:Transmis sionAgency>DTN Integrated
Services/dtnDataConnect</pcats:Transmiss ionAgency>
</pcats:Transmiss ionHeader>
<pcats:FuelPric eInfo>
<pcats:Terminal >
<pcats:Name identType="Plan tNumber" ident="1070">
<pcats:NamePref ix>Frsn KMEP</pcats:NamePrefi x>
</pcats:Name>
<pcats:City>Fre sno</pcats:City>
<pcats:State>CA </pcats:State>
<pcats:FuelProd uct><pcats:Effe ctiveDate>2007-06-04</pcats:Effective Date>
<pcats:Effectiv eTime>10:00:00</pcats:Effective Time>
<pcats:FuelProd uctId identType="Ultr a Low Sulfur CARB
#2">0402</pcats:FuelProdu ctId>
<pcats:Price>2. 240000</pcats:Price>
<pcats:NetChang e>.040000</pcats:NetChange >
</pcats:FuelProdu ct>
</pcats:Terminal>
</pcats:FuelPrice Info>
</pcats:FuelsDoc>

Thanks

Bill

Jun 4 '07
13 8164
Jerry;
You're correct.
I played with the new xsd and it seemed to work , but only for the 1st table
<transmissionHe aderin the dataset.
When I tried to read the <fuelPriceInfor ecord, I got error since
<terminaland <fuelproducta re nested.
Can you please help with the .readxml syntax for nested items?

Thanks

Bill

"Jerry N" <st******@newsg roup.nospamwrot e in message
news:u9******** ******@TK2MSFTN GP05.phx.gbl...
Martin Honnen had an example buried in his message. I added it to the
FuelsDoc declarations as shown below. I also tested it on the web page
(http://www.xmlforasp.net/codebank/sy...enerator.aspx).

<?xml version="1.0"?>
<pcats:FuelsD oc
xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:pcats="ht tp://example.com/ns1"
xsi:schemaLocat ion="NAXML-FuelPrice15.xsd ">
<pcats:Transmis sionHeader>
<pcats:Transmis sionId>20070604 0938</pcats:Transmiss ionId>
<pcats:Transmis sionDate>2007-06-04</pcats:Transmiss ionDate>
<pcats:Transmis sionTime>09:38: 19-06:00</pcats:Transmiss ionTime>
<pcats:Transmis sionStatus>orig inal</pcats:Transmiss ionStatus>
<pcats:Transmis sionSender>Apex Oil</pcats:Transmiss ionSender>
<pcats:Transmis sionAgency>DTN Integrated
Services/dtnDataConnect</pcats:Transmiss ionAgency>
</pcats:Transmiss ionHeader>
<pcats:FuelPric eInfo>
<pcats:Terminal >
<pcats:Name identType="Plan tNumber" ident="1070">
<pcats:NamePref ix>Frsn KMEP</pcats:NamePrefi x>
</pcats:Name>
<pcats:City>Fre sno</pcats:City>
<pcats:State>CA </pcats:State>
<pcats:FuelProd uct><pcats:Effe ctiveDate>2007-06-04</pcats:Effective Date>
<pcats:Effectiv eTime>10:00:00</pcats:Effective Time>
<pcats:FuelProd uctId identType="Ultr a Low Sulfur CARB
#2">0402</pcats:FuelProdu ctId>
<pcats:Price>2. 240000</pcats:Price>
<pcats:NetChang e>.040000</pcats:NetChange >
</pcats:FuelProdu ct>
</pcats:Terminal>
</pcats:FuelPrice Info>
</pcats:FuelsDoc>
"Bill Nguyen" <bi************ *****@jaco.comw rote in message
news:u1******** *****@TK2MSFTNG P05.phx.gbl...
>Jerry;
Where do I need to add the 'pcats' namespace declaration?
THanks
Bill
"Jerry N" <st******@newsg roup.nospamwrot e in message
news:uX******* *******@TK2MSFT NGP03.phx.gbl.. .
>>Yes, I removed the 'pcats' prefix to get it to work. I forgot to
include it in my original reply. When you add the namespace
declaration , I hope this web page works better.

Jerry

"Bill Nguyen" <bi************ *****@jaco.comw rote in message
news:eN****** *******@TK2MSFT NGP05.phx.gbl.. .
Jerry;
I got an error message regarding 'pcats' namespace is undeclared. It
seems to me that 'pcats' was removed from the xsd file you generated!

Thanks

Bill
"Jerry N" <st******@newsg roup.nospamwrot e in message
news:%2***** **********@TK2M SFTNGP05.phx.gb l...
I've used this XSD generator and like the output:
http://www.xmlforasp.net/codebank/sy...Generator.aspx
>
Here's the output (after I made some minor changes to make it a valid
XML message):
>
<?xml version="1.0" encoding="utf-16"?>
<xs:schem a id="FuelsDoc"
targetNames pace="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:mstns ="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns="http ://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:xs="h ttp://www.w3.org/2001/XMLSchema"
xmlns:msdat a="urn:schema s-microsoft-com:xml-msdata"
attributeFo rmDefault="qual ified" elementFormDefa ult="qualified" >
<xs:element name="FuelsDoc" msdata:IsDataSe t="true"
msdata:UseC urrentLocale="t rue">
<xs:complexType >
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:element name="Transmiss ionHeader">
<xs:complexType >
<xs:sequence>
<xs:element name="Transmiss ionId" type="xs:string "
minOccurs=" 0" />
<xs:element name="Transmiss ionDate" type="xs:string "
minOccurs=" 0" />
<xs:element name="Transmiss ionTime" type="xs:string "
minOccurs=" 0" />
<xs:element name="Transmiss ionStatus" type="xs:string "
minOccurs=" 0" />
<xs:element name="Transmiss ionSender" type="xs:string "
minOccurs=" 0" />
<xs:element name="Transmiss ionAgency" type="xs:string "
minOccurs=" 0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FuelPrice Info">
<xs:complexType >
<xs:sequence>
<xs:element name="Terminal" minOccurs="0"
maxOccurs=" unbounded">
<xs:complexType >
<xs:sequence>
<xs:element name="City" type="xs:string "
minOccurs=" 0" />
<xs:element name="State" type="xs:string "
minOccurs=" 0" />
<xs:element name="Name" minOccurs="0"
maxOccurs=" unbounded">
<xs:complexType >
<xs:sequence>
<xs:element name="NamePrefi x"
type="xs:st ring" minOccurs="0" msdata:Ordinal= "0" />
</xs:sequence>
<xs:attribute name="identType "
form="unqua lified" type="xs:string " />
<xs:attribute name="ident" form="unqualifi ed"
type="xs:st ring" />
</xs:complexType>
</xs:element>
<xs:element name="FuelProdu ct" minOccurs="0"
maxOccurs=" unbounded">
<xs:complexType >
<xs:sequence>
<xs:element name="Effective Date"
type="xs:st ring" minOccurs="0" />
<xs:element name="Effective Time"
type="xs:st ring" minOccurs="0" />
<xs:element name="Price" type="xs:string "
minOccurs=" 0" />
<xs:element name="NetChange " type="xs:string "
minOccurs=" 0" />
<xs:element name="FuelProdu ctId"
nillable="t rue" minOccurs="0" maxOccurs="unbo unded">
<xs:complexType >
<xs:simpleConte nt
msdata:Colu mnName="FuelPro ductId_Text" msdata:Ordinal= "1">
<xs:extension base="xs:string ">
<xs:attribute name="identType "
form="unqua lified" type="xs:string " />
</xs:extension>
</xs:simpleConten t>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
>
"Bill Nguyen" <bi************ *****@jaco.comw rote in message
news:%2**** ************@TK 2MSFTNGP04.phx. gbl...
>Is it possible to create your won XSD to use with .NET based on an
>XML content?
>For example the one below:
>>
><?xml version="1.0"?>
><pcats:Fue lsDoc
>xmlns="htt p://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
>xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
>xsi:schema Location="NAXML-FuelPrice15.xsd ">
><pcats:Tra nsmissionHeader >
><pcats:Tra nsmissionId>200 706040938</pcats:Transmiss ionId>
><pcats:Tra nsmissionDate>2 007-06-04</pcats:Transmiss ionDate>
><pcats:Tra nsmissionTime>0 9:38:19-06:00</pcats:Transmiss ionTime>
><pcats:Tra nsmissionStatus >original</pcats:Transmiss ionStatus>
><pcats:Tra nsmissionSender >Apex Oil</pcats:Transmiss ionSender>
><pcats:Tra nsmissionAgency >DTN Integrated
>Services/dtnDataConnect</pcats:Transmiss ionAgency>
></pcats:Transmiss ionHeader>
><pcats:Fue lPriceInfo>
><pcats:Ter minal>
><pcats:Nam e identType="Plan tNumber" ident="1070">
><pcats:Nam ePrefix>Frsn KMEP</pcats:NamePrefi x>
></pcats:Name>
><pcats:Cit y>Fresno</pcats:City>
><pcats:Sta te>CA</pcats:State>
><pcats:Fue lProduct><pcats :EffectiveDate> 2007-06-04</pcats:Effective Date>
><pcats:Eff ectiveTime>10:0 0:00</pcats:Effective Time>
><pcats:Fue lProductId identType="Ultr a Low Sulfur CARB
>#2">0402 </pcats:FuelProdu ctId>
><pcats:Pri ce>2.240000</pcats:Price>
><pcats:Net Change>.040000</pcats:NetChange >
></pcats:FuelProdu ct>
></pcats:Terminal>
></pcats:FuelPrice Info>
></pcats:FuelsDoc>
>>
>Thanks
>>
>Bill
>>
>>
>>
>
>



Jun 6 '07 #11
I loaded the generated schema into VS.NET 2005 and it displayed good
diagram. It looks like you're trying to take the next step and load
relational tables into a dataset from an XML file. I would take a look at
"Typed DataSets" and create a separate typed dataset so you can examine the
code that gets generated. You'll need to find out how to create the
ForeignKeyConst raints, etc.

I would also recommend a book "Pragmatic ADO.NET" by Shawn Wildermuth since
it has several chapters on DataSets, Typed DataSets, etc.

Jerry

"Bill Nguyen" <bi**********@j aco.comwrote in message
news:26******** *************** ***********@mic rosoft.com...
Jerry;
You're correct.
I played with the new xsd and it seemed to work , but only for the 1st
table <transmissionHe aderin the dataset.
When I tried to read the <fuelPriceInfor ecord, I got error since
<terminaland <fuelproducta re nested.
Can you please help with the .readxml syntax for nested items?

Thanks

Bill

"Jerry N" <st******@newsg roup.nospamwrot e in message
news:u9******** ******@TK2MSFTN GP05.phx.gbl...
>Martin Honnen had an example buried in his message. I added it to the
FuelsDoc declarations as shown below. I also tested it on the web page
(http://www.xmlforasp.net/codebank/sy...enerator.aspx).

<?xml version="1.0"?>
<pcats:FuelsDo c
xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:xsi="htt p://www.w3.org/2001/XMLSchema-instance"
xmlns:pcats="h ttp://example.com/ns1"
xsi:schemaLoca tion="NAXML-FuelPrice15.xsd ">
<pcats:Transmi ssionHeader>
<pcats:Transmi ssionId>2007060 40938</pcats:Transmiss ionId>
<pcats:Transmi ssionDate>2007-06-04</pcats:Transmiss ionDate>
<pcats:Transmi ssionTime>09:38 :19-06:00</pcats:Transmiss ionTime>
<pcats:Transmi ssionStatus>ori ginal</pcats:Transmiss ionStatus>
<pcats:Transmi ssionSender>Ape x Oil</pcats:Transmiss ionSender>
<pcats:Transmi ssionAgency>DTN Integrated
Services/dtnDataConnect</pcats:Transmiss ionAgency>
</pcats:Transmiss ionHeader>
><pcats:FuelPri ceInfo>
><pcats:Termina l>
><pcats:Name identType="Plan tNumber" ident="1070">
<pcats:NamePre fix>Frsn KMEP</pcats:NamePrefi x>
</pcats:Name>
><pcats:City>Fr esno</pcats:City>
<pcats:State>C A</pcats:State>
><pcats:FuelPro duct><pcats:Eff ectiveDate>2007-06-04</pcats:Effective Date>
<pcats:Effecti veTime>10:00:00 </pcats:Effective Time>
<pcats:FuelPro ductId identType="Ultr a Low Sulfur CARB
#2">0402</pcats:FuelProdu ctId>
<pcats:Price>2 .240000</pcats:Price>
<pcats:NetChan ge>.040000</pcats:NetChange >
</pcats:FuelProdu ct>
></pcats:Terminal>
></pcats:FuelPrice Info>
></pcats:FuelsDoc>
"Bill Nguyen" <bi************ *****@jaco.comw rote in message
news:u1******* ******@TK2MSFTN GP05.phx.gbl...
>>Jerry;
Where do I need to add the 'pcats' namespace declaration?
THanks
Bill
"Jerry N" <st******@newsg roup.nospamwrot e in message
news:uX****** ********@TK2MSF TNGP03.phx.gbl. ..
Yes, I removed the 'pcats' prefix to get it to work. I forgot to
include it in my original reply. When you add the namespace
declaratio n, I hope this web page works better.

Jerry

"Bill Nguyen" <bi************ *****@jaco.comw rote in message
news:eN***** ********@TK2MSF TNGP05.phx.gbl. ..
Jerry;
I got an error message regarding 'pcats' namespace is undeclared. It
seems to me that 'pcats' was removed from the xsd file you generated!
>
Thanks
>
Bill
"Jerry N" <st******@newsg roup.nospamwrot e in message
news:%2**** ***********@TK2 MSFTNGP05.phx.g bl...
>I've used this XSD generator and like the output:
>http://www.xmlforasp.net/codebank/sy...Generator.aspx
>>
>Here's the output (after I made some minor changes to make it a valid
>XML message):
>>
><?xml version="1.0" encoding="utf-16"?>
><xs:sche ma id="FuelsDoc"
>targetName space="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
>xmlns:mstn s="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
>xmlns="htt p://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
>xmlns:xs=" http://www.w3.org/2001/XMLSchema"
>xmlns:msda ta="urn:schema s-microsoft-com:xml-msdata"
>attributeF ormDefault="qua lified" elementFormDefa ult="qualified" >
> <xs:element name="FuelsDoc" msdata:IsDataSe t="true"
>msdata:Use CurrentLocale=" true">
> <xs:complexType >
> <xs:choice minOccurs="0" maxOccurs="unbo unded">
> <xs:element name="Transmiss ionHeader">
> <xs:complexType >
> <xs:sequence>
> <xs:element name="Transmiss ionId" type="xs:string "
>minOccurs= "0" />
> <xs:element name="Transmiss ionDate" type="xs:string "
>minOccurs= "0" />
> <xs:element name="Transmiss ionTime" type="xs:string "
>minOccurs= "0" />
> <xs:element name="Transmiss ionStatus" type="xs:string "
>minOccurs= "0" />
> <xs:element name="Transmiss ionSender" type="xs:string "
>minOccurs= "0" />
> <xs:element name="Transmiss ionAgency" type="xs:string "
>minOccurs= "0" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="FuelPrice Info">
> <xs:complexType >
> <xs:sequence>
> <xs:element name="Terminal" minOccurs="0"
>maxOccurs= "unbounded" >
> <xs:complexType >
> <xs:sequence>
> <xs:element name="City" type="xs:string "
>minOccurs= "0" />
> <xs:element name="State" type="xs:string "
>minOccurs= "0" />
> <xs:element name="Name" minOccurs="0"
>maxOccurs= "unbounded" >
> <xs:complexType >
> <xs:sequence>
> <xs:element name="NamePrefi x"
>type="xs:s tring" minOccurs="0" msdata:Ordinal= "0" />
> </xs:sequence>
> <xs:attribute name="identType "
>form="unqu alified" type="xs:string " />
> <xs:attribute name="ident" form="unqualifi ed"
>type="xs:s tring" />
> </xs:complexType>
> </xs:element>
> <xs:element name="FuelProdu ct" minOccurs="0"
>maxOccurs= "unbounded" >
> <xs:complexType >
> <xs:sequence>
> <xs:element name="Effective Date"
>type="xs:s tring" minOccurs="0" />
> <xs:element name="Effective Time"
>type="xs:s tring" minOccurs="0" />
> <xs:element name="Price" type="xs:string "
>minOccurs= "0" />
> <xs:element name="NetChange "
>type="xs:s tring" minOccurs="0" />
> <xs:element name="FuelProdu ctId"
>nillable=" true" minOccurs="0" maxOccurs="unbo unded">
> <xs:complexType >
> <xs:simpleConte nt
>msdata:Col umnName="FuelPr oductId_Text" msdata:Ordinal= "1">
> <xs:extension base="xs:string ">
> <xs:attribute name="identType "
>form="unqu alified" type="xs:string " />
> </xs:extension>
> </xs:simpleConten t>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:choice>
> </xs:complexType>
> </xs:element>
></xs:schema>
>>
>"Bill Nguyen" <bi************ *****@jaco.comw rote in message
>news:%2*** *************@T K2MSFTNGP04.phx .gbl...
>>Is it possible to create your won XSD to use with .NET based on an
>>XML content?
>>For example the one below:
>>>
>><?xml version="1.0"?>
>><pcats:Fu elsDoc
>>xmlns="ht tp://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
>>xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
>>xsi:schem aLocation="NAXM L-FuelPrice15.xsd ">
>><pcats:Tr ansmissionHeade r>
>><pcats:Tr ansmissionId>20 0706040938</pcats:Transmiss ionId>
>><pcats:Tr ansmissionDate> 2007-06-04</pcats:Transmiss ionDate>
>><pcats:Tr ansmissionTime> 09:38:19-06:00</pcats:Transmiss ionTime>
>><pcats:Tr ansmissionStatu s>original</pcats:Transmiss ionStatus>
>><pcats:Tr ansmissionSende r>Apex Oil</pcats:Transmiss ionSender>
>><pcats:Tr ansmissionAgenc y>DTN Integrated
>>Service s/dtnDataConnect</pcats:Transmiss ionAgency>
>></pcats:Transmiss ionHeader>
>><pcats:Fu elPriceInfo>
>><pcats:Te rminal>
>><pcats:Na me identType="Plan tNumber" ident="1070">
>><pcats:Na mePrefix>Frsn KMEP</pcats:NamePrefi x>
>></pcats:Name>
>><pcats:Ci ty>Fresno</pcats:City>
>><pcats:St ate>CA</pcats:State>
>><pcats:Fu elProduct><pcat s:EffectiveDate >2007-06-04</pcats:Effective Date>
>><pcats:Ef fectiveTime>10: 00:00</pcats:Effective Time>
>><pcats:Fu elProductId identType="Ultr a Low Sulfur CARB
>>#2">040 2</pcats:FuelProdu ctId>
>><pcats:Pr ice>2.240000</pcats:Price>
>><pcats:Ne tChange>.040000 </pcats:NetChange >
>></pcats:FuelProdu ct>
>></pcats:Terminal>
>></pcats:FuelPrice Info>
>></pcats:FuelsDoc>
>>>
>>Thanks
>>>
>>Bill
>>>
>>>
>>>
>>
>>
>
>



Jun 6 '07 #12
You can also load your xml file into VS2005 and click "Create Schema" button
(or access it from the XML menu).
When you load the file into VS, it will also list all the errors you have in
it.

--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bill Nguyen" <bi************ *****@jaco.comw rote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Is it possible to create your won XSD to use with .NET based on an XML
content?
For example the one below:

<?xml version="1.0"?>
<pcats:FuelsD oc
xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocat ion="NAXML-FuelPrice15.xsd ">
<pcats:Transmis sionHeader>
<pcats:Transmis sionId>20070604 0938</pcats:Transmiss ionId>
<pcats:Transmis sionDate>2007-06-04</pcats:Transmiss ionDate>
<pcats:Transmis sionTime>09:38: 19-06:00</pcats:Transmiss ionTime>
<pcats:Transmis sionStatus>orig inal</pcats:Transmiss ionStatus>
<pcats:Transmis sionSender>Apex Oil</pcats:Transmiss ionSender>
<pcats:Transmis sionAgency>DTN Integrated
Services/dtnDataConnect</pcats:Transmiss ionAgency>
</pcats:Transmiss ionHeader>
<pcats:FuelPric eInfo>
<pcats:Terminal >
<pcats:Name identType="Plan tNumber" ident="1070">
<pcats:NamePref ix>Frsn KMEP</pcats:NamePrefi x>
</pcats:Name>
<pcats:City>Fre sno</pcats:City>
<pcats:State>CA </pcats:State>
<pcats:FuelProd uct><pcats:Effe ctiveDate>2007-06-04</pcats:Effective Date>
<pcats:Effectiv eTime>10:00:00</pcats:Effective Time>
<pcats:FuelProd uctId identType="Ultr a Low Sulfur CARB
#2">0402</pcats:FuelProdu ctId>
<pcats:Price>2. 240000</pcats:Price>
<pcats:NetChang e>.040000</pcats:NetChange >
</pcats:FuelProdu ct>
</pcats:Terminal>
</pcats:FuelPrice Info>
</pcats:FuelsDoc>

Thanks

Bill

Jun 7 '07 #13
Hello! Good Site! Thanks you! cxdgkijybd
Jun 21 '07 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1383
by: Snke | last post by:
How can use ASP to read in the ms-word document files the content, then copy the content to access? I attempt ("word.application") have opened with CreateObject to word document only. Can I use "Find" function to search ms-word content in ASP? Thanks.
2
8225
by: Tom | last post by:
Anytime someone wants to open a document, they have to first save it to disk. They cannot simply choose "open". If a user attempts to open the document, they are met with the error message "there was an error opening the document the file cannot be found". Here is my C# ASP.NET web code. I am running IE 6.0. Can anyone advise. ... First I create the file and then use Response object to open it. Response.ContentType="application/pdf";...
4
6313
by: Fabian | last post by:
Hi I want to change the content of text file. I use an StreamReader to read but I can´t use a StreamWriter for the same Stream. What I must do to implement content changing? Thanks for help Fabian
0
4703
by: Peter | last post by:
I am having a problem reading an Excel file that is XML based. The directory I am reading contains Excel files that can be of two types. Either generic Microsoft based or XML based. I am reading the Microsoft based files with an OleDbDataAdapter. Then filling the contents of the first worksheet into a dataset. However when I try to add the XML based file to my dataset using an XmlTextReader I can never seem to get it to save to a...
1
4177
by: GaryB | last post by:
Hi, (Posted this in scripting.wsh before I realised that it might be better placed here - sorry if you;ve got two copies) I want my (IE) Intranet users to be able to create a new Word document based on a specified template. The following works, but I would like to be able to pass the filename as a parameter, as there are often multiple documents on the same page:
0
1686
by: peter | last post by:
Hi All, I have a template with some VBA code behind and some controls on it such as combo boxes. When I try to create a new document based on this template from C# code it opens fine but the controls are in design mode and the VBA code behind doesnt run. oDoc = oWord.Documents.Add(ref oTemplate, ref oMissing, ref oMissing, ref oMissing);
1
4522
by: tofu.captain | last post by:
I have PDFs saved in a SQL 2005 server as BLOBs. I would like to extract the BLOBs and either: 1. create a PDF file on the hard disk or 2. open/stream the PDF into the application I am using a VB.net winform (not a web form). How would I go about doing this? I use CutePDF to initially convert a
1
32947
by: ujjwaltrivedi | last post by:
Hey guys, Can anyone tell me how to create a text file with Unicode Encoding. In am using FileStream Finalfile = new FileStream("finalfile.txt", FileMode.Append, FileAccess.Write); ###Question: Now this creates finalfile.txt with ANSI Encoding ...which is a default. Either tell me how to change the default or how to create a
0
2701
by: Thomas | last post by:
How do you create an XML document based on an XML Schema? I have an XML Schema that defines several primary XML document types (i.e. the top-level element contains 4 complex type child elements in a choice group). I used xsd.exe to generate classes to simplify setting the values in the instance objects. My question is how do I serialize the objects to an XML document based on a specific child element referenced in the XML schema's...
1
2811
by: Thomas | last post by:
Does anyone have a best practices recommendation on writing a valid XML document based on a 3rd party XML schema? I have a working solution but I would like to know if anyone has a better approach. My solution: 1) Pull the data from the database into datatables (in my case, this is DB2). 2) Validate all required data columns (I've written a method that iterates through all the datatables rows and throws an exception if
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.