|
Would it not be easier to use some form of database?
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Hi, I'm looking to convert my visual studio (version 8) .vcproj file ( xml v1.0 ), in a way that I can exclude .cpp files from the build and add .cpp files to the build.
As I understand it XSLT should be a neat way of doing this, but being an XML newbie I wanted to ask some basic questions first.
- 1) Any good code C# / C++ or whatever projects or whatever of parsing the .VCPROJ XML format?
- 2) Alternatively can XSLT do this easily?
- 3) Can I get XSLT to spit out what it finds without me having to describe the format of the .vcproj file? You see I don't really care about it's format, I just know I want certain .cpp files excluded from building, and some .cpp files added and have the rest of the file be replicated as it was.
- 4) If 3) can work, is it easy enough to have the XSLT have an exclusion list, i.e. .cpp files I want to leave alone.
- 5) What is the best way of doing this if not using XSLT?
NB. this is for automating a 'unity build' which removes .cpp files form the build in favour of master .cpp files that actually #include the .cpp files!
Thanks in advance,
Tortoise.
|
|
|
|
|
writing it as we speak in C#, chosen NOT to use XSLT since I need to spit out the '#include file.cpp' to a .cpp, as well as write a new .vcProj... but maybe there is a way with xslt transformations.
|
|
|
|
|
|
Unity build..
1) In visual studio exclude all you .cpp from the build.
2) #include all your .cpp files into a new .cpp file and add this .cpp to the build.
3) Compile, link ( note the speed difference ).
|
|
|
|
|
Thanks I now found a reference to it on this blog[^] (another blog using a horrible font what's up with that? )
CodeTortoise wrote: since I need to spit out the '#include file.cpp' to a .cpp, as well as write a new .vcProj
I don't believe it will do that but you could just have two XSLT's, one for each output file and run them both. The answer to all the rest of your can XSLT do this and that is yes. You can create just about any Text output using XSLT. That said, since UB is a development activity rather than a production build activity writing your C# utility to do this seems a perfectly fine choice.
led mike
|
|
|
|
|
create callery by use C# and xml and flash
|
|
|
|
|
hossein_abbasi wrote: create callery
What is callery?[^] Please provide a link to a resource that defines it.
led mike
|
|
|
|
|
Has anyone seen this article on how to Convert Excel to XML file/XML Schema, and validate Excel against XML Schema at this website: http://www.codeproject.com/KB/office/excel2xml.aspx?
I am trying to convert an Excel file to an XML file. I have downloaded the files in this article and have tried to get to the screen that is shown in the example. However, I don't know how to connect the Jet Engine to the Excel Spreadsheets.
Can anyone tell me how I would get to this screen? Or where I would write the command to make the connection.
Prompt response will be greatly appreciated.:
confused:
|
|
|
|
|
Rebecca Fox wrote: Prompt response will be greatly appreciated.:
confused:
Hi Rebecca, welcome to CodeProject
The articles like the one you are using have there own forums/blogs at the bottom of the article page. That is the best place to ask questions pertaining to the article.
I am not familiar with that article. However glancing through it, and I have no idea what the scope of your project is, but one of the most frequently used approaches for working with Office applications is to use the Primary Interop Assembly for the product. There are different assemblies for different versions of Office. For example you would go here if working with Office XP[^]. There is a different resource for Office 2003 etc.
led mike
|
|
|
|
|
HI
I have a string which has text like in XML format. but i need to store this string as an XML file. How can i do this?
Help me,
SAnthapur
|
|
|
|
|
Santhapur wrote: I have a string which has text like in XML format
No such thing as "like in XML format". It's either well formed XML or not, period.
Santhapur wrote: but i need to store this string as an XML file. How can i do this?
Do you know how to write files to disk? If you do then do it, if you don't then your problem has nothing to do with XML.
led mike
|
|
|
|
|
i am getting a string the content of the string will be well formatted XML document. i need to store the whole content of the string to a XML file and save it to the disk.
Did u get my problem
|
|
|
|
|
Santhapur wrote: i need to store the whole content of the string to a XML file and save it to the disk.
Did u get my problem
Yes, did you read my reply?
led mike wrote: Do you know how to write files to disk? If you do then do it, if you don't then your problem has nothing to do with XML.
led mike
|
|
|
|
|
This is the content of my string
<?xml version="1.0"?>
<PatientUpdate>
<MSH>
<MSH.1>|</MSH.1>
<MSH.2>^~\&</MSH.2>
<MSH.3>
<EI.1>REGADT</EI.1>
</MSH.3>
<MSH.4>
<EI.1>MCM</EI.1>
</MSH.4>
<MSH.5>
<EI.1>RSP1P8</EI.1>
</MSH.5>
<MSH.6>
<EI.1>MCM</EI.1>
</MSH.6>
<MSH.7>19960105153000+0000</MSH.7>
<MSH.8>SEC</MSH.8>
<MSH.9>
<CM_MSH.1>ADT</CM_MSH.1>
<CM_MSH.2>A44</CM_MSH.2>
</MSH.9>
<MSH.10>00000007</MSH.10>
<MSH.11>
<PT.1>P</PT.1>
</MSH.11>
<MSH.12>2.3</MSH.12>
</MSH>
<PID>
<PID.3>
<CX.1>MR2</CX.1>
<CX.4>
<HD.1>XYZ</HD.1>
</CX.4>
</PID.3>
<PID.5>
<XPN.1>JONES</XPN.1>
<XPN.2>WILLIAM</XPN.2>
<XPN.3>A</XPN.3>
<XPN.4>JR</XPN.4>
</PID.5>
<PID.7>19501010000000+0000</PID.7>
<PID.8>M</PID.8>
<PID.11>
<XAD.1>123 EAST STREET</XAD.1>
<XAD.3>NY</XAD.3>
<XAD.4>NY</XAD.4>
<XAD.5>10021</XAD.5>
</PID.11>
<PID.13>
<XTN.1>(212)111-3333</XTN.1>
</PID.13>
<PID.16>S</PID.16>
<PID.18>
<CX.1>ACCT1</CX.1>
</PID.18>
</PID>
</PatientUpdate>
|
|
|
|
|
Hai I found the Solution...
here it is
String fileName = @"\XMLFile.xml"; Some XML file path in which u want to store....
File.Delete(fileName); <red>Every time your are deleting the file to avoid appending the text for every execution.</red>
File.AppendAllText(fileName,XmlFormat); Coping the string value into the xml file..
Santhapur
|
|
|
|
|
Please forgive my ignorance...I am trying to learn XML while working on a project that may not be able to be done...not sure.
The goal of my project is to create a configuration file that feeds a scheduled program details about reports that need to be run from a database. The details of the "QUERIES.XML" file should contain a "Report" Element. The "Report" element should contain a "Title", "Query", and "Recipients" elements. The Title and Query elements are good. I am having trouble reading the recipients though. The recipients element should have two elements, "Name" and "Address" [e-mail address].
I have tried to create a DataSet but that only reads the Title and Query elements, but does not pick up any of the recipient information.
Here is a sample of my XML file, which I am not even sure is correct. I have been searching all day until I am cross-eyed and I don't know what I am missing.
<?xml version="1.0" encoding="utf-8" ?>
<Report>
<Title>Test Report</Title>
<Query>select Col1, Col2, Col3 FROM Table1 WHERE Criteria='this'</Query>
<Recipient>
<name>John Smith</name>
<address>john.smith@domain.com</address>
</Recipient>
<Recipient>
<name>Joe Williams</name>
<address>joe.williams@domain.com</address>
</Recipient>
</Report>
I have also tried a variation of the file that looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<Report>
<Title>Test Report</Title>
<Query>select Col1, Col2, Col3 FROM Table1 WHERE Criteria='this'</Query>
<Recipients>
<address>john.smith@company.com</address>
<address>joe.williams@company.com</address>
</Recipient>
</Report>
I am not looking for anyone to write code for me...I need some direction on where to go so I can learn and improve my skill.
Thanks
|
|
|
|
|
Hi jontyler
Here I think you have to create two different data tables for it, and put them into data set.
Thanks,
Devaang
|
|
|
|
|
Thanks, Devaang...I was sorta afraid I would get that kind of response. I guess I will redesign and put it back into a small db file.
|
|
|
|
|
Hi,
I am currently doing a project which requires me to transform a HL7 XML format file into a generic XML file using XSL. May I know how to do this?
modified on Thursday, July 24, 2008 10:24 PM
|
|
|
|
|
Member 4703966 wrote: a project which requires me to transform a HL7 XML format file into a generic XML file using XSL.
I don't believe that makes any sense. It's likely that you need to study the XML technology space to gain a better understanding of it for your project. Try sites like TopXML and www.w3schools.com, I think they have lots of introductory type material.
led mike
|
|
|
|
|
Hi,
This might be a very basic doubt...
Can 'ref' element be used to refer a new xsd.
Harsha
|
|
|
|
|
|
I'm implementing the XmlSchemaProvider attribute and am having some issues defining my XSD. I've created a XSD file which will be an embedded resource in an assembly. I'm attempting to import the MS WSDL types schema so that I can provide a defintion for char datatype, but every way I try and add the namespace and import the schema I get resolution errors. I'm VERY new to XSDs and have some working knowledge of XML so I'm not 100% positive I can do what I want to here, but this is the basic pattern I have seen in many WSDLs for adding support for char datatypes.
Any answers or shoves in the right direction would be appreciated.
Below is a sample format for my XSD:
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema.xsd" xmlns:mstns="http://tempuri.org/XMLSchema.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs0="http://microsoft.com/wsdl/types/">
<xs:import namespace="http://microsoft.com/wsdl/types/"/>
<!--cannot resolve "http://microsoft.com/wsdl/types/" error here-->
<xs:complexType name="MyComplexType">
<xs:sequence>
<xs:element name="Value" nillable="true">
<xs:complexType>
<xs:choice>
<xs:element name="boolean" type="xs:boolean" />
<xs:element name="byte" type="xs:byte" />
<xs:element name="unsignedByte" type="xs:unsignedByte" />
<xs:element name="short" type="xs:short" />
<xs:element name="unsignedShort" type="xs:unsignedShort" />
<xs:element name="int" type="xs:int" />
<xs:element name="unsignedInt" type="xs:unsignedInt" />
<xs:element name="long" type="xs:long" />
<xs:element name="unsignedLong" type="xs:unsignedLong" />
<xs:element name="float" type="xs:float" />
<xs:element name="double" type="xs:double" />
<xs:element name="decimal" type="xs:decimal" />
<xs:element name="dateTime" type="xs:dateTime" />
<xs:element name="string" type="xs:string" />
<xs:element name="char" type="xs0:char" />
<!--Type http:=
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
|
|
|
|
|
I'm createing an XSD file which will be an embedded resource in an assembly. I'm attempting to import the MS WSDL types schema so that I can provide a defintion for char datatype, but every way I try and add the namespace and import the schema I get resolution errors. I'm VERY new to XSDs and have some working knowledge of XML so I'm not 100% positive I can do what I want to here, but this is the basic pattern I have seen in many WSDLs for adding support for char datatypes.
Any answers or shoves in the right direction would be appreciated.
Below is a sample format for my XSD:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xs0="http://microsoft.com/wsdl/types/"
>
<xs:import namespace="http://microsoft.com/wsdl/types/"/> <!--cannot resolve "http://microsoft.com/wsdl/types/" error here-->
<xs:complexType name="MyComplexType">
<xs:sequence>
<xs:element name="Value" nillable="true">
<xs:complexType>
<xs:choice>
<xs:element name="boolean" type="xs:boolean" />
<xs:element name="byte" type="xs:byte" />
<xs:element name="unsignedByte" type="xs:unsignedByte" />
<xs:element name="short" type="xs:short" />
<xs:element name="unsignedShort" type="xs:unsignedShort" />
<xs:element name="int" type="xs:int" />
<xs:element name="unsignedInt" type="xs:unsignedInt" />
<xs:element name="long" type="xs:long" />
<xs:element name="unsignedLong" type="xs:unsignedLong" />
<xs:element name="float" type="xs:float" />
<xs:element name="double" type="xs:double" />
<xs:element name="decimal" type="xs:decimal" />
<xs:element name="dateTime" type="xs:dateTime" />
<xs:element name="string" type="xs:string" />
<xs:element name="char" type="xs0:char" /> <!--Type http:
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
|
|
|
|