|
If u want to do this using any programming lang. then u should check the documentation of lang. There will be some methods provided by its api to extract xml elements.
|
|
|
|
|
Hi all!
I want to add an extra header in my output xml which is generated by converting simple xml.
how can i add header in o/p xml?
plz suggest me.
|
|
|
|
|
jagjit_surfer wrote: how can i add header in o/p xml?
Well you could use XSLT for that. There are other ways.
|
|
|
|
|
I m currently using xslt, but i don't know the way how can i set xml declaration?
I want to add extra declaration like in my transformed xml doc.
Would u plz suggest me?
modified on Friday, February 20, 2009 1:55 AM
|
|
|
|
|
jagjit_surfer wrote: but i don't know the way how can i set xml declaration?
Are you looking for this[^]?
Or maybe you are looking for this element[^]
If not I don't understand what you want to do. Try using the tutorials and documentation on that site I linked to.
Also don't repost your messages in these forums. It is considered rude and is a waste of resources.
modified on Friday, February 20, 2009 10:46 AM
|
|
|
|
|
I am making a databse query file for device application in XML file. But it is not recognizing the "<" sign...what should be included in order to make it recognize "<" sign
|
|
|
|
|
Hi,This is a part of my xml file. I am not able to sort the results with same board type and different occupancy.
<establishment>
36697
<description>Express By Holiday Inn Croydon <contract>164.GR-ALL-SWS
<child_min_age>0
<child_max_age>11
<location>
<destination>
LON
<description>London
<zone>
7
<description>Croydon
<category>
3EST
<description>3 STARS
<incoming_contract>TS80024237
<offer>YES
<classification>NOR
<currency>GBP
<room>
FAM.ST
<description>FAMILY ROOM STANDARD <availability>4
<price>
<occupancy>
<adults>2
<children>1
<rooms>1
<board_type>
CB
<description>CONTINENTAL BREAKFAST
<amount>46.89
<room>
DBL.ST
<description>DOUBLE STANDARD <availability>4
<price>
<occupancy>
<adults>2
<children>0
<rooms>2
<board_type>
CB
<description>CONTINENTAL BREAKFAST
<amount>93.78
<room>
TWN.ST
<description>TWIN STANDARD
<availability>4
<price>
<occupancy>
<adults>2
<children>0
<rooms>2
<board_type>
CB
<description>CONTINENTAL BREAKFAST
<amount>93.78
Fisrt group all rooms by board type then under board type group rooms
with each occupancy type e.g. room with different occupancy are grouped together
Thanks
A J A Y
|
|
|
|
|
Hi,
I have to get the videos from a web page or from a YouTube page with the help of their embedded tags. I came to know that this is possible through XML parsing. I need to do this in my ASP.Net (with C#.Net) application. Anyone who have idea on this please help me.
Thank you
|
|
|
|
|
Hi,
I need to develop an application in which we have to get the videos in a Youtube page in to my database or to somewhere from which i can upload them into my database. I came to know that we can do this using XML parsing. If you have any solution for this please help me.
Thank you
|
|
|
|
|
Hi, I'm new to XSL transformations so bear with me. I've got an xsl stylesheet where I'm trying to skip lines after each XML item called 'message'. I haven't figured out where to put my <br/> tags, and I also want to be able to change the font of my xml element node 'date' to a different font color. I'm brand new so I appreciate any help
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
<table width="500" border="0">
<xsl:for-each select="Message">
<tr>
<td>
<xsl:value-of select="message" />
</td>
</tr>
<br/>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
|
|
|
|
|
I got it
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="Message[Message]">
<html>
<body>
<table border="0">
<xsl:apply-templates select="Message"/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="Message[parent::Message]">
<tr>
<!--<td>
<xsl:value-of select="title"/>
</td>-->
<!--<td>
<xsl:value-of select="subtitle"/>
</td>-->
<td style="color:red;">
<xsl:value-of select="date"/>
</td>
<td style ="font-weight:bold">
<xsl:value-of select="messagetext"/>
</td>
</tr>
<br/>
</xsl:template>
</xsl:stylesheet>
|
|
|
|
|
Hi,
I'm parsing a fixed size flat file document and convert it into XML, but I therefore have output like
<root>
<foo bar=" lulz "> zomg </foo>
<hello> world</hello>
</root>
Which I'd like to look like:
<root>
<foo bar="lulz">zomg</foo>
<hello>world</hello>
</root>
Is there a way to do this with XSLT? I've tryed a copy/copy-of and normalize-space, but it doesn't give me the output I'd want. This is driving me insane.
Thanks!
|
|
|
|
|
Tony_P wrote: I'm parsing a fixed size flat file document and convert it into XML
Why don't you trim the spaces during the parsing/processing of the flat file?
|
|
|
|
|
That'd be indeed nice but it's document generated by webMethods, I can't do that.
|
|
|
|
|
Ok, I'm lost now. Good luck
|
|
|
|
|
You can use translate , a XPath function, with an empty replace string.
translate($data, " ", "")
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
This cannot work as you need to know the structure of the document to apply translate.
I don't think this is possible, I've been searching the whole internet, and nothing came up. XSLT is such a stupid standard.
|
|
|
|
|
Tony_P wrote: XSLT is such a stupid standard.
Sure it is.
Ever listen to any Led Zeppelin? You might want to check this song out[^].
|
|
|
|
|
If you are using .NET, have you considered using Script Blocks using msxsl:script to create your own XSLT trimming function?
An even better solution is to use XsltArgumentList .
Also, what is normalize-space not doing to fit your needs?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
modified on Friday, February 13, 2009 11:56 AM
|
|
|
|
|
I'm new to schematron and can't find any forums related to it, so if anyone can help I would appreciate it.
I want to check that if an element has a child (it might not) that the child is one of a pre-defined set of elements.
Eg.
if we have a fish_tank element it could have child elements of fish, gravel, filters, pirate_ship, etc
So here is what I think the scheme would be
<pattern name="aquarium">
<rule context="child::fish_tank">
<assert test="name()='fish' or name()='gravel' or name='pirate_ship'">Not a valid element!</assert>
</rule>
</pattern>
|
|
|
|
|
Hi,
I want to view my xml in the Html page using stylesheet(XSL)so that it should provide me the tree view in Html. Same as what we are achieving in xml with removal of the XSL reference.
Can any one provide me some guidance to achive that?
Thanks
Bhuvanesh
|
|
|
|
|
It's possible I could help however I am not clear what you are attempting to do.
Member 4392373 wrote: I want to view my xml in the Html page
That is unclear since you don't view anything in HTML. One views HTML in a browser.
Member 4392373 wrote: using stylesheet(XSL)
Member 4392373 wrote: with removal of the XSL reference.
Using XSL with removal of XSL reference. No idea what that means.
Member 4392373 wrote: I want to view my xml
Member 4392373 wrote: Same as what we are achieving in xml
Again, no idea what that means.
|
|
|
|
|
I want to make a collapsible menu using XSL for the xml child node.
|
|
|
|
|
Member 4392373 wrote: I want to make a collapsible menu using XSL for the xml child node.
Do you know how to create a collapsible menu in DHTML?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hello all,
I'm looking to buy a good XML Editor/Studio. I've looked at Liquid XML. Any alternatives I should review?
Thanks.
|
|
|
|