|
|
I need to create an XML document with these values, then convert the xml to a xml schema.. How can i do this?
Ticket Number: IR123456
Application: about 15 applications we support ex. Solspark, NSS and so on
Date and Time:
Duration: 15 min 60 min or more
Missed SLA?: Yes/No
Repeat Problem: Yes/No
Impacted Program/Job: text
Customers Impacted: text
Incident Description: text
Root Cause: text
Resolution: text
|
|
|
|
|
Well, sounds like you need to read some very basic articles. Creating XML from this is trivial, it's just a case of deciding on a format ( use nodes or attributes, etc ). If you don't know how to do that, then you really shouldn't be messing with any XML until you do.
You can't really create a 100% accurate schema from one XML, you're better off creating it by hand.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I need to utilize a web service to send XML data. I have the XML file as a SOAP format and have converted to a string. I just need to be able to send this via the web service - sync or async - and check the response is ok. Can someone please guide me through this?
|
|
|
|
|
shalu madan wrote: I have this task in hand to utilize a web service to send XML data. I have the XML file as a SOAP format and have converted to a string. I just need to be able to send this via the web service - sync or async - and check the response is ok.
The technology you are intending to use for connecting and communicating to the Web Service has nothing to do with XML/XSL. You should find more relevant forum to ask your question. Also don't forget to actually ask a question, as you did not here. Also, it sound more like you should be looking for an example, sample or tutorial using the specific tools you intend on using. Perhaps you should do that rather than post another non-question in a forum.
led mike
|
|
|
|
|
Good Afternoon Guys , i have never attempted to save Data to the Database from the XML FILE, i have the Following
public static string SaveObjectToDB(object obj)
{
string sql = "", xml = "", result = "";
foreach (Attribute attr in obj.GetType().GetCustomAttributes(true))
{
DBStoredProcAttribute dbSPAttr = attr as DBStoredProcAttribute;
if (dbSPAttr != null)
{
xml = SerializeObjectToXML(obj);
xml = xml.Replace("\\r\\n", "").Replace("\r\n", "").Replace("<?xml version=\"1.0\" encoding=\"utf-16\"?>", "");
int StartPos=0;
StartPos = xml.IndexOf("<SubjectStructure>");
if (StartPos > 0)
{
xml = xml.Substring(StartPos);
}
sql = dbSPAttr.SaveObjectSP + "'" + xml.Trim() + "'";
result = ExecuteStoredProc(sql);
}
}
return result;
}
Can you please help Explain this Function code.If i can Directly save the data to the Database, why should i put it to XML First then SQL
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I don't understand. Are you asking what the code does? It sounds like you are asking why the person did it this way, there is no way we can know that.
led mike
|
|
|
|
|
hi Led
I meant , Am new to XML, i wanted to Know what are these Functions do like
Attribute attr in obj.GetType().GetCustomAttributes(true))
xml.Replace("\\r\\n", "").Replace("\r\n", "").Replace("<?xml version=\"1.0\" encoding=\"utf-16\"?>", "");
StartPos = xml.IndexOf("<SubjectStructure>");
sql = dbSPAttr.SaveObjectSP + "'" + xml.Trim() + "'";
Am reading a book, to famirialize myself with XML
Thank you
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
In my xsd file I have a bool element. I want to set a restriction so that it can only be set to true if a previous element is present and has a particular value.
Something like this
<xs:simpleType name="someEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="Value1" />
<xs:enumeration value="Value2" />
</xs:restriction>
</xs:simpleType>
...
<xs:element name="Field1" type="someEnum" minOccurs="0" maxOccurs="1" />
<xs:element name="Field2" type="xs:boolean" minOccurs="0" maxOccurs="1" />
I want to change it so that Field2 can only be true if Field1 is Value2 from the enum
|
|
|
|
|
How to valitate Xml test suites? is there any tool for valitate them?
|
|
|
|
|
raveen wrote: How to valitate Xml test suites?
If you can't be bothered to provide specific relevant information why should we bother to help you?
led mike
|
|
|
|
|
|
XML is a text format, so there's no images to show.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello.
I've a problem to sort a XML file into another xml file.
Here's the content of my XML File:
File: Drive.xml
<code>
<drive name="C" type="Local Disk" filesystem="NTFS" capacitygb="232" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}">
<folder name="Depends" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Depends" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}">
<file name="Profile.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Depends/Profile.xml" type="File" typefile="XML" sizebytes="1254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<file name="Identity.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Depends/Identity.xml" type="File" typefile="XML" sizebytes="1284" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
</folder>
<file name="Meteo.pdf" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Meteo.pdf" type="File" typefile="PDF" sizebytes="1254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="Documents and Settings" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Documents and Settings" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="etc" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/etc" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="Program Files" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Program Files" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}">
<file name="Identity.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Program Files/Identity.xml" type="File" typefile="XML" sizebytes="1284" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
</folder>
<folder name="Zouzou" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Zouzou" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}">
<file name="Profile.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Zouzou/Profile.xml" type="File" typefile="XML" sizebytes="1254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<file name="Identity.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Zouzou/Identity.xml" type="File" typefile="XML" sizebytes="1284" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<file name="Report.doc" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Zouzou/Report.doc" type="File" typefile="DOC" sizebytes="1254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
</folder>
<folder name="Windows" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Windows" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<file name="LastCoroner.avi" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/LastCoroner.avi" type="File" typefile="AVI" sizebytes="1231254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="Inetpub" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Inetpub" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
</drive>
</code>
I want to sort it to have the following file : SortedDrive.xml which is sort first by the <file> and after by the <folder>
<code>
<drive name="C" type="Local Disk" filesystem="NTFS" capacitygb="232" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}">
<file name="LastCoroner.avi" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/LastCoroner.avi" type="File" typefile="AVI" sizebytes="1231254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<file name="Meteo.pdf" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Meteo.pdf" type="File" typefile="PDF" sizebytes="1254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="Depends" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Depends" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}">
<file name="Profile.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Depends/Profile.xml" type="File" typefile="XML" sizebytes="1254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<file name="Identity.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Depends/Identity.xml" type="File" typefile="XML" sizebytes="1284" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
</folder>
<folder name="Documents and Settings" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Documents and Settings" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="etc" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/etc" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="Inetpub" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Inetpub" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="Program Files" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Program Files" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}">
<file name="Identity.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Program Files/Identity.xml" type="File" typefile="XML" sizebytes="1284" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
</folder>
<folder name="Windows" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Windows" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<folder name="Zouzou" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Zouzou" type="Folder" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}">
<file name="Profile.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Zouzou/Profile.xml" type="File" typefile="XML" sizebytes="1254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<file name="Identity.xml" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Zouzou/Identity.xml" type="File" typefile="XML" sizebytes="1284" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
<file name="Report.doc" key="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}/Zouzou/Report.doc" type="File" typefile="DOC" sizebytes="1254" description="" repositoryid="{A9545674-FD69-4AFE-ACEC-D53767EC22B8}" />
</folder>
</drive>
</code>
How can I do that ?
Thank you very much
|
|
|
|
|
Dude you can't even follow the instructions on this site for posting code. What are the odds that you can accomplish the far more complicated task of developing a software solution?
led mike
|
|
|
|
|
|
|
Sorry, here's the input file
|
|
|
|
|
I am attempting to make a schema where the valid options for a given enumeration are based on the content of another tag. Right now, I am attempting the following: I have an element with name="source", which can contain one of the following enumerated values {"src1", "src2"}. Now, what I want to do is to have another element with name="dependent", such that if tag "source" is set to "src1", the user has options {"opt1", "opt2"} for the "dependent" tag. If tag "source" is set to "src2", I would like the user to be able to set the "dependent" tag to one of {"opt3", "opt4"}. I am presently attempting the following:
<xs:choice>
<xs:sequence>
<xs:element name="source">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="src1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="dependent">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="opt1"/>
<xs:enumeration value="opt2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element name="source">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="src2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="dependent">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="opt3"/>
<xs:enumeration value="opt4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:choice> However, I am getting the error, "Elements with the same name and in the same scope must have the same type." Is there a way to accomplish what I am trying to do without forcing the tags in either option to have unique names? Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
I have a list of employees in excel file and I want to use a Search of a website for all the employees one by one.
I want to do this through my application. My quertion is how can I access that website through my application. And how to use the Search of a website with my own searching criteria.
please reply as soon as possible
|
|
|
|
|
Don't cross post
led mike
|
|
|
|
|
Hi All,
I would like to load a java script array dynamically inside xsl. Suppose I have the following xml
<srsource>
<individualsr>
<srid>srid1</srid>
<srothervalue>srothervalue1</srothervalue>
</individualsr>
<individualsr>
<srid>srid2</srid>
<srothervalue>srothervalue2</srothervalue>
</individualsr>
</srsource>
What I want to do is populate a javascript array during the xsl transformation so that I get an array like the one below when the html page is loaded.
test['srid1'] = 'srothervalue1'
test['srid2'] = 'srothervalue2' and so on..
Could anyone tell me how the above piece of code can be included inside xsl:for-each?
Thanks
Ashvish
|
|
|
|
|
Ashvish wrote: What I want to do is populate a javascript array during the xsl transformation so that I get an array like the one below when the html page is loaded.
Ashvish wrote: Could anyone tell me how the above piece of code can be included inside xsl:for-each?
Not sure I understand your question. I mean whatever you put inside the xsl:for-each is output into the result so like:
<xsl:for-each select="*/individualsr">
test['<xsl:value-of select="./srid"/>'] = '<xsl:value-of select="./srothervalue"/>';
</xsl:for-each>
led mike
|
|
|
|
|
Thanks for the reply. What I am really trying to do is something like
<xsl:variable name="user" select="Login/UserInfo/UserName"/>
<SCRIPT language="JavaScript">
<![CDATA[
...
rowA = new Object()
rowA.data1 = ']]><xsl:value-of select="$user" /><![CDATA['
rowA.data2 = 'needs'
rowA.data3 = 'help'
myTable.append_row(rowA)
...
]]>
</SCRIPT>
This works in Mozilla but not in IE. What could be the reason?
|
|
|
|
|
I don't know if you post got messed up or what but it doesn't make any sense.
led mike
|
|
|
|