|
I actually view XML documents as a datatable, and in fact you can store a datatable to XML format by the ToXML command.
|
|
|
|
|
Usually we meet various files like XLS,txt and others when preparing for a report, are their any easy ways or tools to make the format conversion more directly and easily?
|
|
|
|
|
XML is the data container; XSLT is the document that transforms the XML into some other data container -- its purpose is to do what you are asking. XSD is the schema -- it defines the format of the XML so that consumers can correctly instantiate objects that are contained in the XML document.
People are not seeming to understand the difference or the purpose of XML/XSD/XSLT -- and that is somewhat tragic because it is the best way to do things and maintain validity of data through disparate systems.
|
|
|
|
|
Please advice how I run xml using ecplipse:
am new to this field............
|
|
|
|
|
|
Hi Guys,
I have an Wix installer. I need to end one running task befor starting the upgrade. I tried the custom action through batch script and added to the sequence "InstallInitialize", but this custom action didn't lanuch before starting the upgrade and it didn't worked. Anybody have any idea, how to implement this.
Thank you very much for your help.
-Prasanth
|
|
|
|
|
Hi!I have a scenario.a company ask me to include a payment system in my application and this is the requirement :
a) we need you to provide us a location (in the form of a URL) which we can use to hit your server
b) we will send information regarding a payment transaction in the following XML format to your server at the URL address:
Request sent from ABC Company to My Company
="1.0"
<!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd">
<COMMAND>
<TYPE>PAYMENT</TYPE>
<COMPANYNAME>Luku</COMPANYNAME> <CUSTOMEREFID>refernceNumber</CUSTOMEREFID>
<MSISDN>msisdn</MSISDN>
<AMOUNT></AMOUNT>
<TXNID></TXNID>
<STATUS></STATUS>
</COMMAND>
c) on your side, we need you to interpret the information provide in the XML string, take whatever actions need to be taken on your platform, and then give us a response with the results of your actions in the following format:
Asynchronous response sent from My Company to ABC
<?xml version="1.0"?>
<!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd">
<COMMAND>
<TYPE>GBPHANDLER</TYPE>
<TXNID>BP120522.1117.C00001</TXNID>
<REFID>1357</REFID>
<RESULT>TS</RESULT>
<ERRORCODE>ERR123</ERRORCODE>
<FLAG>Y</FLAG>
<CONTENT>Content For Sending SMS</CONTENT>
<MSISDN>09899847486</MSISDN>
<COMPANYCODE>Luku</COMPANYCODE>
</COMMAND>
I have tried to resolve,this is my xml file I have created:
<?xml version="1.0"?>
<!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd">
<COMMAND>
<TYPE>GBPHANDLER</TYPE>
<TXNID>BP120522.1117.C00001</TXNID>
<REFID>1357</REFID>
<RESULT>TS</RESULT>
<ERRORCODE>ERR123</ERRORCODE>
<FLAG>Y</FLAG>
<CONTENT>Content For Sending SMS</CONTENT>
<MSISDN>09899847486</MSISDN>
<COMPANYCODE>Luku</COMPANYCODE>
</COMMAND>
and this is my .dtd file :
<?xml version="1.0"?>
<!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd">
<COMMAND>
<TYPE>GBPHANDLER</TYPE>
<TXNID>BP120522.1117.C00001</TXNID>
<REFID>1357</REFID>
<RESULT>TS</RESULT>
<ERRORCODE>ERR123</ERRORCODE>
<FLAG>Y</FLAG>
<CONTENT>Content For Sending SMS</CONTENT>
<MSISDN>09899847486</MSISDN>
<COMPANYCODE>Luku</COMPANYCODE>
</COMMAND>
Now I am stack on that level.My question is this Which url I need to provide? how to make a generated xml file?Am I need to store this information into a database? because the system need to verify an incomming request everytime a customer need to make a payment by verifying a reference code generated from the system and check if it is matching the amount of a product he want to buy.Please need an idea.I am spending a lot of time learning xml but I am not finding the answer.By the way I am using c#.net.Thanks!
|
|
|
|
|
I would suppose the URL you need to give will be the address url of your HANDLER to handle the client companys request.... (the page you make to process the request)
So if your handler was called TransactionValidator.php then the url would be....
http://www.yourcompany.net/some-folder/TransactionValidator.php
I thought a .dtd was a document type definition in which case it should describe the data format of your xml file (I recommend you check this - as i may be wrong).
Yes you need to persist the request (and the results) in a database for future refrence in case things go pear shaped!!
|
|
|
|
|
|
Hi!I am putting this code in xml file:
<COMMAND>
<TYPE>GBPHANDLER</TYPE>
<TXNID>BP120522.1117.C00001</TXNID>
<REFID>1357</REFID>
<RESULT>TS</RESULT>
<ERRORCODE>ERR123</ERRORCODE>
<FLAG>Y</FLAG>
<CONTENT>Content For Sending SMS</CONTENT>
<MSISDN>09899847486</MSISDN>
<COMPANYCODE>Luku</COMPANYCODE>
</COMMAND>
but I am getting this error in the code:
Could not find a part of the path 'C:\MyProject\xml\command.dtd'.
Am I need to create a file with .dtd extension or what? please can someone help to resolve this.
|
|
|
|
|
You have told the XML reader that the schema for your XML is held in file xml/command.dtd, so you need to provide that DTD file also.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Ohh thanks.I didn't know that it is necessary to create a separate file.It is my first time to work with dtd and xml file so...
|
|
|
|
|
In that case I would suggest you spend some time learning the structure of XML and DTD files before proceeding further.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hello. I'm new to xml and i have a big problem. How to generate an xml sample document from this schema ?
<xs:schema targetNamespace="http://www.csi.it/sigit/sigitweb/xml/import" elementFormDefault="qualified" attributeFormDefault="unqualified"><!-- ELENCO IMPIANTI --><xs:element name="ElencoImpianti"></xs:element><!-- ******************************* --><!-- DEFINIZIONE SEZIONI --><!-- ******************************* --><!-- IMPIANTO --><xs:element name="Impianto"></xs:element><!-- ******************************* --><!-- DEFINIZIONE TIPI COMPLESSI --><!-- ******************************* --><!-- MANUTENTORE --><xs:element name="Manutentore"></xs:element><!-- IDENTIFICAZIONE IMPIANTO --><xs:element name="IdentificazioneImpianto"></xs:element><!-- ELENCO RESPONSABILI --><xs:complexType name="ElencoResponsabili"></xs:complexType><!-- RESPONSABILE --><xs:element name="Responsabile"></xs:element><!-- ELENCO EDIFICI --><xs:complexType name="ElencoAltriEdifici"></xs:complexType><!-- ALTRI EDIFICI --><xs:element name="AltriEdifici"></xs:element><!-- ELENCO APPARECCHIATURE --><xs:complexType name="ElencoApparecchiature"></xs:complexType><!-- APPARECCHIATURA --><xs:element name="Apparecchiatura"></xs:element><!-- ELENCO ALLEGATOG --><xs:complexType name="ElencoAllegatoG"></xs:complexType><!-- ALLEGATOG --><xs:element name="AllegatoG"></xs:element><!-- ELENCO ALLEGATOF --><xs:complexType name="ElencoAllegatoF"></xs:complexType><!-- ALLEGATOF --><xs:element name="AllegatoF"></xs:element><xs:element name="ElencoPagine"></xs:element><!-- PAGINA ALLEGATOF --><xs:element name="Pagina"></xs:element></xs:schema>
I browser some tips/tricks and read some tutorials, but i don t get the way it works an xml file without having a root element, but having 5 global elements?
Thanks in advance!
|
|
|
|
|
I tried to import the schema into VS 2010 and Excel and both say not a valid schema. So the answer is you can't generate a sample document from the schema and you should go to the source and get a corrected one.
|
|
|
|
|
If there is no root, you do not have a valid document. I think you are confusing the XML declaration with the root -- the root is the first element that is NOT the XML declaration...what you have posted -- is an XML schema fragment.
|
|
|
|
|
Consider the following XML file:
<handbook title="HangGlider">
<section title="Red Jewel 1:1" />
<section title="Red Jewel 1:2" />
<section title="Red Jewel 1:3" />
<section title="Red Jewel 1:4" />
<section title="Green Jewel 1:1" />
<section title="Green Jewel 1:2" />
<section title="Green Jewel 1:3" />
<section title="Green Jewel 1:4" />
</handbook>
<handbook title="WingRunner">
<section title="Red Jewel 1:1" />
<section title="Red Jewel 1:2" />
<section title="Red Jewel 1:3" />
<section title="Red Jewel 1:4" />
<section title="Green Jewel 1:1" />
<section title="Green Jewel 1:2" />
<section title="Green Jewel 1:3" />
<section title="Green Jewel 1:4" />
</handbook>
<handbook title="SkyStormer">
<section title="Red Jewel 1:1" />
<section title="Red Jewel 1:2" />
<section title="Red Jewel 1:3" />
<section title="Red Jewel 1:4" />
<section title="Green Jewel 1:1" />
<section title="Green Jewel 1:2" />
<section title="Green Jewel 1:3" />
<section title="Green Jewel 1:4" />
</handbook> I would like to lay the file out so that the repeated data only exists once, but can be shared by multiple handbooks. Is that possible?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Do you mean like this?
<handbooks>
<CommonSections>
<section title="Red Jewel 1:1" InBooks="1,2,3"/>
<section title="Red Jewel 1:2" InBooks="1,2,3"/>
<section title="Red Jewel 1:3" InBooks="1,2,3"/>
<section title="Red Jewel 1:4" InBooks="1,2,3"/>
<section title="Green Jewel 1:1" InBooks="1,2,3"/>
<section title="GreenJewel 1:2" InBooks="1,2,3"/>
<section title="Green Jewel 1:3" InBooks="1,2,3"/>
<section title="Green Jewel 1:4" InBooks="1,2,3"/>
</CommonSections>
<handbook id="1" title="HangGlider">
</handbook>
<handbook id="2" title="WingRunner">
</handbook>
<handbook id="3" title="SkyStormer">
</handbook>
</handbooks>
|
|
|
|
|
I am a total rookie so forgive my ignorance in advance.
I am (trying) to use XSLT to transform XML output from my Filemaker database so that I can re-import it (to synchronize the data after it has been copy-edited externally).
The whole business works fine with one exception. In the xml file, some text has visual tags such as <hi rend="italic"></hi>.
The xslt does not bring this tagging into the transformed file. I have tried using
<xsl:copy-of select="note"/> and
<xsl:value-of select="note"/>
either one of these brings the text perfectly, but not the <hi> tags.
ideas?
I'm using oXygen 12.2 and FMProAdvanced 11.
thanks!
|
|
|
|
|
Turns out "copy-of" was working, it was FMPro that is stripping the angle bracket tags out of the file on import. BAD Filemaker!
|
|
|
|
|
i have one xml and xsl and i am using javascript in xsl to load xml values like
<script type="text/javascript">
chars="<xsl:value-of select="//system-params/login/forbiddenChars" disable-output-escaping="yes" />;
Length = <xsl:value-of select="//system-params/login/Digits" disable-output-escaping="yes"/>;
</script>
and now i do not want to write above javaScript code in XSL and only want to include javascript by creating seperate file for javascript.
provide answers with exapmle by defining three (3) seperate file. i am begineer in this language.
modified 17-Sep-12 3:10am.
|
|
|
|
|
May be it can help you
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="//system-params">
<html>
<head>
<script type="text/javascript" src="YourJSfile.js" />
</head>
</html>
</xsl:template>
|
|
|
|
|
Actually i want to do like this as you mention in your answer but i am loadind XML values in javascript and this script is in XSL.
If i write above code in javascript file then i can not load xml values because these values dynamically loaded at the time of HTML generation.
|
|
|
|
|
Hi
I have XSL I created, that display output recieved from xml from Store Procedure.
My XSL has labels which are headings of columns, then for-each block for my output.
My output doesn't have to come belows my columns, I need to have something like this:
Column Value (first format)
-----------------
Name: Tom
Last Name: Brown
*NOT* (Second format)
-----
Name Last Name
Tom Brown
How do I display the output like in the first format, because my FOR-EACH clause in the xsl is the one taking data from Store Proc and displaying it.
|
|
|
|
|
Hi,
below my xml file
- <CateringOrders>
- <orders>
<userid>1</userid>
<orderid>DAK081012093349</orderid>
<Menu>Appetizers</Menu>
<MenuType>Veg</MenuType>
<Region>South-Indian</Region>
<Items>Vankaya Bajji</Items>
<Tray>Half Tray</Tray>
<Qty>12</Qty>
</orders>
- <orders>
<userid>2</userid>
<orderid>DAK081012093811</orderid>
<Menu>Appetizers</Menu>
<MenuType>Veg</MenuType>
<Region>South-Indian</Region>
<Items>Aloo Vada</Items>
<Tray>Half Tray</Tray>
<Qty>18</Qty>
</orders>
- <orders>
<userid>3</userid>
<orderid>DAK081012093811</orderid>
<Menu>Appetizers</Menu>
<MenuType>Veg</MenuType>
<Region>South-Indian</Region>
<Items>Vankaya Bajji</Items>
<Tray>Half Tray</Tray>
<Qty>20</Qty>
</orders>
</CateringOrders>
below auto increment code
Dim xmldoc As New XmlDocument()
Dim Str_XmlFile As String = ""
Str_XmlFile = Server.MapPath("~/CatOrders/") & "CateringOrder.xml"
If Not File.Exists(Str_XmlFile) Then
Dim StrWriter As New XmlTextWriter(Str_XmlFile, System.Text.Encoding.UTF8)
StrWriter.WriteStartDocument(True)
StrWriter.WriteStartElement("CateringOrders")
StrWriter.WriteEndElement()
StrWriter.Close()
End If
xmldoc.Load(Str_XmlFile)
Dim parentelement As XmlElement = xmldoc.CreateElement("orders")
Dim nodes As XmlNodeList = xmldoc.SelectNodes("//orders/userid")
Dim nNodeID As Integer = nodes.Count
nNodeID += 1
Dim userid As XmlElement = xmldoc.CreateElement("userid")
userid.InnerText = nNodeID
Dim orderid As XmlElement = xmldoc.CreateElement("orderid")
orderid.InnerText = Session("orderid")
please let me know how to get last unique id
|
|
|
|