|
Well, "well-formed" XML is syntactically valid XML. "Valid" XML is always well-formed, but must also be semantically correct. XML is not valid when you use unknown elements, attributes or invalid child elements etc.
example:
Let's say you have XML document describing car. You have some schema (.xsd file), allowing only wheel element inside car element.
<car>
<wheel />
<wheel />
<sometotalydifferentxmlelement />
</car>
is well-formed XML, but invalid.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
<students>
<id="501",name="ravi">
<id="502",name="kiran">
<students>
i need to bind xml to 2 dropdownbox in .net and once i clik on id i need to get the corresponding value in 2 dropdownbox
plz let me know
|
|
|
|
|
No one can understand your question please can you elaborate it ?
|
|
|
|
|
Can this code snippet be optimized?
dim xwriter as xmltextwriter
dim fo as folder
dim file as Scripting.File
......
xwriter = New XmlTextWriter(filename, System.Text.Encoding.UTF8)
Try
fo = fso.GetFolder(spath)
Catch ex As Exception
MessageBox.Show( ex.Message )
Exit Sub
End Try
xwriter.WriteStartDocument()
xwriter.Formatting() = Formatting.Indented
xwriter.WriteStartElement("directory")
xwriter.WriteAttributeString("Name", fo.Name)
xwriter.WriteAttributeString("marked", "0")
xwriter.WriteAttributeString("Path", fo.Path)
For Each file In fo.Files
xwriter.WriteStartElement("file")
xwriter.WriteAttributeString("Name", file.Name)
xwriter.WriteAttributeString("marked", "0")
xwriter.WriteAttributeString("Path", file.Path)
xwriter.WriteEndElement() 'Ende file
Next
'xml-file is filled recursive
xmlschreiben(xwriter, fo)
xwriter.WriteEndElement()
xwriter.WriteEndDocument()
xwriter.Close()
......
Public Sub xmlschreiben(ByRef xwriter As XmlTextWriter, ByRef folder As Folder)
Dim subfo As Folder
Dim file As Scripting.File
Try
For Each subfo In folder.SubFolders
'directories:
xwriter.WriteStartElement("directory")
xwriter.WriteAttributeString("Name", subfo.Name)
xwriter.WriteAttributeString("marked", "0")
xwriter.WriteAttributeString("Path", subfo.Path)
'files
For Each file In subfo.Files
xwriter.WriteStartElement("file")
xwriter.WriteAttributeString("Name", file.Name)
xwriter.WriteAttributeString("marked", "0")
xwriter.WriteAttributeString("Path", file.Path)
xwriter.WriteEndElement() 'Ende file
Next
If subfo.SubFolders.Count <> 0 Then
xmlschreiben(xwriter, subfo)
End If
xwriter.WriteEndElement() 'Ende directory
Next
Catch ex As IOException
MessageBox.Show(ex.Message)
End Try
End Sub
Does anybody of you have an idea how to optimize this code? i don't but I need to make the performance of this code snippet faster than before! Thank you very much for your help!
|
|
|
|
|
I do not have much experience with VB.NET, but I think it would be sufficient to declare the arguments of the xmlSchreiben method as ByVal , because you only use the parameters but never assign new values to them. Furthermore, it should be sufficient to the following check: If subfo.SubFolders.Count > 0 Then .
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
can any one please help me to generate the XMl schema and DTD schema from an xml file using java in IDE net beans, jdk1.5
|
|
|
|
|
Maybe you find one here: http://www.w3.org/XML/Schema#Tools[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
can any body please help me to generate the xml schema and dtd schema fom xml file using java
sameer
|
|
|
|
|
can any body please help me to generate the xml schema and dtd schema fom xml file using java
shamy
|
|
|
|
|
Hello All,
Is it possible to build a multilanguage website using XML/XSLT to dynamically populate elements of a page with texts in a selected language?
|
|
|
|
|
Nothing is impossible
If you're using ASP.NET to develop your web application there is already built-in support for what you're trying to achieve. Search for "Localization ASP.NET". If I recall right there was also an article here on CP that covered the localization of an ASP.NET web application.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Stefan Troschütz wrote: Nothing is impossible
Indeed, but the site I am thinking about is not built with ASP.NET. It is running on Apache.
|
|
|
|
|
Ok, do you use any kind of server-side-technology like PHP or JSP on your apache server? Maybe they have some built-in support for localization too. If not, i'm quite sure that it is possible with JSP to apply an XSLT stylesheet to an XHTML source that inserts language-specific text to certain elements. I have alomost no experience with PHP, so it's hard to say how chances are to implement such thing with this technology.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
PHP is available.
BTW, I am not willing to use JavaScript (or anything that runs on client), because more and more people disable its support in their browsers.
|
|
|
|
|
Hi,
I work on an xml project using xerces integrated to the MS VC++ 6.0 environment (msdev). I need to integrate xerces with MS Visual Studion 2003 (devenv).
The following are the setup options I create with the VC++ 6.0
a. Project Setting -> C/ C++ tab -> Category : Preprocessor ->Additional Include Directory : <path where="" xerces="" is="" stored="" till="" the="" src="" folder="">
b. Project Setting -> Link -> Category : Input -> Object/ Lib Modules : Xerces-c_2D.lib and Addtional lib path : <directory where="" the="" lib="" file="" is="" stored="">
Xerces works fine with this.
When I try the same with MS VS 2003, i get linker errors indicating that there is a clash between the MSXML and xerces' functions definitions. What Should I do to resolve this issue. Please help
|
|
|
|
|
When you "#import" MSXML, don't use the no_namespace attribute or use the rename_namespace attribute. Using a namespace will resolve your clashes.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
hi,
i need some help regarding data access from XML sent by web services.
I have a web service that sends out XML as its result, as below:
<?xml version="1.0" encoding="utf-16"?>
<Response webMethodId="GetUserListing">
<SecurityContext sessionId="154oe1upayjpnx55pg1f3r45" />
<Document>
<ArrayOfUsers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<User>
<UserId>32</UserId>
<Name>foxtrot</Name>
<Address>Suite 712</Address>
<Zip>12345</Zip>
<PhoneNumbers>
<string 111-111-1111/>
</PhoneNumbers>
<Emails>
<string>foo@foo.bar</string>
</Emails>
</User>
</ArrayOfUsers>
<TotalRecords>25</TotalRecords>
</Document>
</Response>
In the RDL file, the Query i specify is:
<Query>
<Method Namespace ="http://tempuri.org/" Name = "ProcessRequest" ></Method>
<SoapAction>http://tempuri.org/ProcessRequest</SoapAction>
</Query>
and the result i get is in a single line that says ProcessRequestResult, with the XML specified above in a single line. however, i need the result in a tabular form, which would give me records of different users, one below the other.
if i specify the <ElementPath> element for the query, i do not get any response at all.
The <ElementPath> element i specify is:
<ElementPath>Response{}/SecurityContext{}/Document{}/ArrayOfUser{}/User</ElementPath>
i need urgent help for this and any help would be appreciated.
Thanks in advance
Deepali
|
|
|
|
|
i am trying to read an mdb(ms access) file
that is i want to read data from an ms access sheet and i am unable to do it.
so please help me with some code relating to the access......
|
|
|
|
|
This has nothing to do with XML or XSL - please post in the appropriate forum.
|
|
|
|
|
hi,
I'm trying to write an XML document through XMLWriter Class. I'm retrieving records fromm a databse table and want to show them in a table format.
Can anyone tell me how to put tab spaces between two values? I'm using the WriteRaw method to write the records on the XML document
|
|
|
|
|
Hi..
I have a hidden text box value in my xslt page . Could anyone please help in retrieving the hidden text box value through xslt and assign the hidden textbox value to a variable?
Thanks & Regards,
Venkat
|
|
|
|
|
it is confusing to under stand... but i think first u have to attach that XSLT to any XML... and modify ur XSLT to store that value in sone variable...
|
|
|
|
|
Hi you experts.
If i call a specific url for example : https://webserver/APIpage.asp?
it returns an xml document that i want to edit in my desktop application.
Can you give me a snippet of code of how can i do that?
I have to make windows application that pick information of my clients, convert in xml and post to above URL as request and the webserver's APIpage.asp process my xml request then in retrun send me xml reponse back in few seconds
the reponse xml file will contain charges, transaction number and image that i have to update in my windows application back
Plz let me know how it can be done in vb.net 2005
Thank you all in advance.
|
|
|
|
|
Perhaps this is a rather basic question, but is there a way to get the path to an XSD file (considering it's added to my current project) without having to hard-code the path?
|
|
|
|
|
Application.StartupPath + Path.DirectorySeparatorChar + relative path to your file (in simplest case the filename)
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|