|
ALSO - to match only nodes with address attribute of 192.180.1.0:
<xsl:for-each select="root/farm-config/farm/connection[@address='192.180.1.0']">
or
<xsl:for-each select="//connection[@address='192.180.1.0']">
|
|
|
|
|
I need a program that will run on a server that will be sitting idle waiting for a website to send it an xml file. when the xml file gets sent to the server I need to parse the xml file and insert some of the data into a oracle database.
The program needs to be a http listener.
the xml file will be small.
Where do I start for making this program?
Does anyone know if Oracle has a function like this built into it?
Thanks all.
|
|
|
|
|
I am new in XML and XSLT. I have got a problem where i have to convert flat records into hierarchial records.
I have an XML containing the following records
<Data>
<Record>
<Id>1</Id>
<Name>something1</Name>
<Level>0</Level>
</Record>
<Record>
<Id>2</Id>
<Name>something2</Name>
<Level>1</Level>
</Record>
<Record>
<Id>3</Id>
<Name>something3</Name>
<Level>1</Level>
</Record>
<Record>
<Id>4</Id>
<Name>something4</Name>
<Level>2</Level>
</Record>
<Record>
<Id>5</Id>
<Name>something5</Name>
<Level>0</Level>
</Record>
</Data>
Now this data has to be arranged in the following manner
<Data>
<Record Id="1" Name="something" Level="0">
<Record Id="2" Name="something2" Level="1"></Record>
<Record Id="3" Name="something3" Level="1">
<Record Id="4" Name="something4" Level="2">
</Record>
</Record>
</Record>
<Record Id="5" Name="something" Level="0">
</Record>
</Data>
the level will decide how much recursion dept will be there.
Can anyone please help me with the XSLT transformer for this problem.
Thanks
Maharishi
Nothing is Impossible. Even impossible spells "i m possible"
|
|
|
|
|
If I have to display selected bytes of a file in XML. How do i do it???
If the data which is read as array and has to be displayed in XML how do i make it possible???
Prakash khatri
|
|
|
|
|
errr what please?? First you must understand that XML is language... you have to define your format for it... there is infinite number of ways how to represent bunch of bytes in XML... Plus XML is textual format... are you sure XML is right choice for your problem? And what do you mean by "display"? XML doesn't define how data look.
I can think of some solutions, bun actually I have no idea what you want:
<data>blablba meaningless bytes here (encoded!!)</data>
"Display" array means have more elements...
<array>
<array_item />
<array_item />
<array_item />
<array_item />
</array>
Or what are you asking??
Sure I can tell you how actual code for writing this XML looks like... at least in .NET.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
I am new to XML, and am having trouble switching back and forth between c# and XML. The foreach loop is not functioning as I would expect. I have a foreach loop inside of another foreach loop. My goal was to say for each step, grab the name and block from each parameter in that step. Instead, it grabs all the step names, then all the parameter info. Is there a child nodes only type function for the for each loop?
Here is a sample from my XML:
<STEP NAME="First step" ID="2" TYPE="CalibrateSPS">
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
</STEP>
<STEP NAME="another step" ID="2" TYPE="CalibrateSPS">
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
</STEP>
Here is an excert from my xsl:
<xsl:for-each select="DOC/STEP">
<h3>Step Name: <xsl:value-of select="@NAME"/> </h3>
<xsl:for-each select="PARAM">
<tr>
<td><xsl:value-of select="NAME"/></td>
<td><xsl:value-of select="BLOCK"/></td>
</tr>
</xsl:for-each>
</xsl:for-each>
Thanks in advance
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
I just ran your xml/xsl in cooktop and it gave me the correct result -
<!DOCTYPE h3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h3>Step Name: First step</h3>
<tr>
<td>Cal sps 1</td>
<td>153</td>
</tr>
<tr>
<td>Cal sps 1</td>
<td>153</td>
</tr>
<tr>
<td>Cal sps 1</td>
<td>153</td>
</tr>
<h3>Step Name: another step</h3>
<tr>
<td>Cal sps 1</td>
<td>153</td>
</tr>
<tr>
<td>Cal sps 1</td>
<td>153</td>
</tr>
<tr>
<td>Cal sps 1</td>
<td>153</td>
</tr>
------
I did not see the DOC element in your xml - so the only change I made is:
<xsl:for-each select="//STEP">
To me your loops should work the way you want!
|
|
|
|
|
how did it look like to use xml in asp.net? is it same like using it in html?
mijan
|
|
|
|
|
I'm not sure what you're asking. Behind the scenes you create XML documents and do XSLT transforms the same as you do with a forms application. If you use XML/XSLT to generate HTML, you just set a label's text to be the XML after the transform, and it renders perfectly.
You need to HTMLEncode XML if you want to display it as XML.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi All...
I have a problem that I will write you down.
I have a web page that use client side xmlhttp ( "Microsoft.XMLHTTP" with javascript ) object to update a piece of data in the page. It work well, accept the clients which use PROXY server to reach internet. Clients with Proxy always gets the oldest data. What can I do to overcome proxy problem when using xmlhttp in client side to reach the data on my server?
tahnx a lot...
karanba
|
|
|
|
|
Hi All
I was having some problem in using Helma's library. The javac couldn't compile my program.
Can anyone help me out or provide a sample programs used to call a remote procedure in an existing server.
Following error messages are displayed--
=========================================================================
.\java\nio\DirectByteBuffer.java:59: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer.Deallocator
assert (address != 0);
^
.\java\nio\DirectByteBuffer.java:165: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (pos <= lim);
^
.\java\nio\DirectByteBufferR.java:165: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectByteBufferR.java:479: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (off <= lim);
^
.\java\nio\DirectByteBufferR.java:570: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (off <= lim);
^
.\java\nio\DirectByteBufferR.java:661: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (off <= lim);
^
.\java\nio\DirectByteBufferR.java:752: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (off <= lim);
^
.\java\nio\DirectByteBufferR.java:843: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (off <= lim);
^
.\java\nio\DirectByteBufferR.java:934: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (off <= lim);
^
.\java\nio\DirectByteBuffer.java:217: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (pos <= lim);
^
.\java\nio\DirectByteBuffer.java:269: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (spos <= slim);
^
.\java\nio\DirectByteBuffer.java:274: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (pos <= lim);
^
.\java\nio\DirectByteBuffer.java:286: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (spos <= slim);
^
.\java\nio\DirectByteBuffer.java:307: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (pos <= lim);
^
.\java\nio\DirectByteBuffer.java:332: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (pos <= lim);
^
.\java\nio\DirectByteBuffer.java:479: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
.\java\nio\ByteBufferAsCharBufferB.java:34: warning: as of release 1.4, assert i
s a keyword, and may not be used as an identifier
assert (pos <= cap);
^
.\java\nio\ByteBufferAsCharBufferB.java:57: warning: as of release 1.4, assert i
s a keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\ByteBufferAsCharBufferB.java:123: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\ByteBufferAsCharBufferB.java:173: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= len);
^
.\java\nio\ByteBufferAsCharBufferL.java:34: warning: as of release 1.4, assert i
s a keyword, and may not be used as an identifier
assert (pos <= cap);
^
.\java\nio\ByteBufferAsCharBufferL.java:57: warning: as of release 1.4, assert i
s a keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\ByteBufferAsCharBufferL.java:123: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\ByteBufferAsCharBufferL.java:173: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= len);
^
.\java\nio\DirectCharBufferU.java:165: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferU.java:217: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferU.java:269: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (spos <= slim);
^
.\java\nio\DirectCharBufferU.java:274: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferU.java:286: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (spos <= slim);
^
.\java\nio\DirectCharBufferU.java:307: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferU.java:332: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferU.java:378: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= len);
^
.\java\nio\DirectCharBufferS.java:165: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferS.java:217: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferS.java:269: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (spos <= slim);
^
.\java\nio\DirectCharBufferS.java:274: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferS.java:286: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (spos <= slim);
^
.\java\nio\DirectCharBufferS.java:307: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferS.java:332: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectCharBufferS.java:378: warning: as of release 1.4, assert is a k
eyword, and may not be used as an identifier
assert (pos <= len);
^
.\java\nio\DirectByteBuffer.java:570: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
.\java\nio\ByteBufferAsShortBufferB.java:34: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= cap);
^
.\java\nio\ByteBufferAsShortBufferB.java:57: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\ByteBufferAsShortBufferB.java:123: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\ByteBufferAsShortBufferL.java:34: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= cap);
^
.\java\nio\ByteBufferAsShortBufferL.java:57: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\ByteBufferAsShortBufferL.java:123: warning: as of release 1.4, assert
is a keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferU.java:165: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferU.java:217: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferU.java:269: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (spos <= slim);
^
.\java\nio\DirectShortBufferU.java:274: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferU.java:286: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (spos <= slim);
^
.\java\nio\DirectShortBufferU.java:307: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferU.java:332: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferS.java:165: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferS.java:217: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferS.java:269: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (spos <= slim);
^
.\java\nio\DirectShortBufferS.java:274: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferS.java:286: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (spos <= slim);
^
.\java\nio\DirectShortBufferS.java:307: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectShortBufferS.java:332: warning: as of release 1.4, assert is a
keyword, and may not be used as an identifier
assert (pos <= lim);
^
.\java\nio\DirectByteBuffer.java:661: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
.\java\nio\ByteBufferAsIntBufferB.java:34: warning: as of release 1.4, assert is
a keyword, and may not be used as an identifier
assert (pos <= cap);
^
.\java\nio\DirectByteBuffer.java:752: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
.\java\nio\DirectByteBuffer.java:843: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
.\java\nio\DirectByteBuffer.java:934: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.DirectByteBuffer
assert (off <= lim);
^
.\java\nio\Bits.java:642: cannot resolve symbol
symbol : method assert (boolean)
location: class java.nio.Bits
assert (reservedMemory > -1);
^
.\java\nio\channels\spi\AbstractSelectableChannel.java:118: cannot resolve symbo
l
symbol : method assert (boolean)
location: class java.nio.channels.spi.AbstractSelectableChannel
assert (i <= keyCount);
^
.\java\lang\CharacterDataLatin1.java:284: cannot resolve symbol
symbol : method assert (boolean)
location: class java.lang.CharacterDataLatin1
assert (data.length == (256 * 2));
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
100 errors
207 warnings
=========================================================================
Ankush
|
|
|
|
|
Anyone know where i can find some good examples on how to create an app that would grab data from a server side xml file? thanks.
|
|
|
|
|
Please elaborate. Explain the scenario.
|
|
|
|
|
I have dataset which is binded to datagrid and dateformating is done based on culture. This happens fine with out any problem.
If my dataset is retrieved as a xml string using dataset.GetXML then converted to dataset and binded to datagrid. The date formatting wont take place instead it displays in the following format
2005-02-09T14:13:24.8280000-00:00.
But I want the dateformatting to take place on datagrid in either of the case.
Padvit
|
|
|
|
|
i also have the same problem
|
|
|
|
|
I have dataset which is binded to datagrid and dateformating is done based on culture. This happens fine with out any problem.
If my dataset is retrieved as a xml string using dataset.GetXML then converted to dataset and binded to datagrid. The date formatting wont take place instead it displays in the following format
2005-02-09T14:13:24.8280000-00:00.
But I want the dateformatting to take place on datagrid in either of the case.
|
|
|
|
|
I believe you have to load the schema. So you would getXML then instantiate a new dataset, load the schema (which will tell it that field is of type date) and then load the xml to the dataset.
|
|
|
|
|
I like an free, easy to use XSLT editor. I've googled a lot and only got advanced comersial versions. Any tip?
_____________________________
...and justice for all
APe
|
|
|
|
|
The next version of visual studio has an XSLT editor/debugger. I'd use XMLSpy Home Edition for a few months if you can't get the beta, then go with that.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I Want to create XML element without name spaces definition.
Help me
Thanks
|
|
|
|
|
Do you mean prefixes namespaces on elements? If so use "exclude-result-prefixes"
Eg:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
<u>exclude-result-prefixes="msxsl"</u>>
If, not, please be more specific!!
|
|
|
|
|
I am trying to insert new nodes within an existing XML document. The insert that I am having problems with is a few nodes deep.
I can insert a new node just below the root node with the following with no problems:
<br />
XmlDocument doc = new XmlDocument();<br />
doc.Load(strXMLPath);<br />
<br />
XmlNode tasks = doc.SelectSingleNode("/tasks");<br />
doc.AppendChild(tasks);<br />
<br />
Now, here is the code which tries to write a little deeper down and is breaking:
<br />
XmlDocument doc = new XmlDocument();<br />
doc.Load(strXMLPath);<br />
<br />
XmlNode checks = doc.SelectSingleNode("/tasks/task[@id='1001']/checks");<br />
doc.AppendChild(checks);<br />
<br />
The error the second code snippet gives is: This document already has a DocumentElement node. It gives this error on the doc.AppendChild(checks); line
I just can't figure it out. I did a quick watch on XmlNode checks = doc.SelectSingleNode("/tasks/task[@id='1001']/checks"); and it did put me in the correct node.
I have no idea why I can not append into this node. Anyone have any ideas?
Here is my XML doc if you want to see it for reference:
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<tasks><br />
<task id="1000"><br />
<name>Task Name</name><br />
<checks><br />
<check id="1000_1"><br />
<time>14:00</time><br />
</check><br />
<check id="1000_2"><br />
<time>23:00</time><br />
</check><br />
</checks><br />
</task><br />
</tasks>
|
|
|
|
|
Why would you want to append the same node that you queried?
I would suggest the following:
XmlNode checks = doc.SelectSingleNode("/tasks/task[@id='1001']/checks");
XmlNode newCheck,newNode;
newCheck = doc.CreateElement("check");
XmlAttribute attr = doc.CreateAttribute("id");
attr.Value = "1000_3";
newCheck.Attributes.Append(attr);
//add child node of new check
newNode = doc.CreateElement("time");
newNode.Value = "15:00";
newCheck.AppendChild(newNode);
checks.AppendChild(newCheck);
|
|
|
|