Click here to Skip to main content
15,895,793 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Does anyone know how to take a XML file and store it into a C++ structure? Pin
Mike A. Fowler13-Apr-08 3:30
Mike A. Fowler13-Apr-08 3:30 
GeneralRe: Does anyone know how to take a XML file and store it into a C++ structure? Pin
pmarfleet13-Apr-08 3:45
pmarfleet13-Apr-08 3:45 
GeneralXML versioning Pin
helen.gonzalez9-Apr-08 22:23
helen.gonzalez9-Apr-08 22:23 
GeneralRe: XML versioning Pin
led mike10-Apr-08 5:56
led mike10-Apr-08 5:56 
GeneralMaintain the order of the xml Pin
Yariv9-Apr-08 20:38
Yariv9-Apr-08 20:38 
GeneralRe: Maintain the order of the xml Pin
Mark J. Miller14-Apr-08 6:33
Mark J. Miller14-Apr-08 6:33 
GeneralRe: Maintain the order of the xml Pin
Yariv14-Apr-08 10:13
Yariv14-Apr-08 10:13 
GeneralRe: Maintain the order of the xml Pin
Mark J. Miller14-Apr-08 10:33
Mark J. Miller14-Apr-08 10:33 
If you can't control the order of KidList and PeopleList then the result your solution will always be the order of the xml document. If KidList is first in the Xml then it will be first in your output.

If you need it to be more generic then you will need to do this:

<br />
		<xsl:for-each select="*"><br />
			<xsl:sort select="@order" data-type="number" /><br />
			<xsl:variable name="TemplateName" select="."/><br />
			<xsl:apply-templates select="$TemplateName"/><br />
		</xsl:for-each><br />
<br />


That is assuming you are still using the "order" attribute in your xml that was in your first post. Otherwise you'll have to sort by the name of the element in descending order (PeopleList then KidList).

<br />
		<xsl:for-each select="*"><br />
			<xsl:sort select="." data-type="text" order="descending" /><br />
			<xsl:variable name="TemplateName" select="."/><br />
			<xsl:apply-templates select="$TemplateName"/><br />
		</xsl:for-each><br />


Mark's blog: developMENTALmadness.blogspot.com

Funniest variable name:
lLongDong - spotted in legacy code, was used to determine how long a beep should be.
- Dave Bacher

GeneralRe: Maintain the order of the xml Pin
Yariv14-Apr-08 20:41
Yariv14-Apr-08 20:41 
Generalxml serialization arraylist Pin
omer erakman8-Apr-08 20:37
omer erakman8-Apr-08 20:37 
GeneralRe: xml serialization arraylist Pin
led mike9-Apr-08 5:03
led mike9-Apr-08 5:03 
GeneralRe: xml serialization arraylist Pin
omer erakman11-Apr-08 1:17
omer erakman11-Apr-08 1:17 
GeneralShowing "&" sign in XML file Pin
Rajeeshun7-Apr-08 14:27
Rajeeshun7-Apr-08 14:27 
GeneralRe: Showing "&" sign in XML file [modified] Pin
logiclabz7-Apr-08 20:47
logiclabz7-Apr-08 20:47 
GeneralRe: Showing "&" sign in XML file Pin
K.P.Kannan8-Apr-08 15:43
K.P.Kannan8-Apr-08 15:43 
GeneralTotal Noobie Pin
abesimpson2-Apr-08 9:53
abesimpson2-Apr-08 9:53 
GeneralRe: Total Noobie Pin
led mike2-Apr-08 11:06
led mike2-Apr-08 11:06 
GeneralAuto Populate and email Word document From ASP.NET 2.0 using xslt/xml Pin
Wilsy2-Apr-08 2:16
Wilsy2-Apr-08 2:16 
Question[Message Deleted] Pin
malarpm2-Apr-08 1:47
malarpm2-Apr-08 1:47 
GeneralRe: Need help in generating xml file using the xsd file in classic asp. Pin
led mike2-Apr-08 4:45
led mike2-Apr-08 4:45 
QuestionCan we lock just a single table in xml file?? Pin
Ron.S1-Apr-08 19:46
Ron.S1-Apr-08 19:46 
AnswerRe: Can we lock just a single table in xml file?? Pin
led mike2-Apr-08 4:42
led mike2-Apr-08 4:42 
AnswerRe: Can we lock just a single table in xml file?? Pin
Dave Kreskowiak2-Apr-08 4:46
mveDave Kreskowiak2-Apr-08 4:46 
QuestionContains Function!!! Please Help me (XPath) Pin
Masterhame31-Mar-08 8:07
Masterhame31-Mar-08 8:07 
GeneralRe: Contains Function!!! Please Help me (XPath) Pin
led mike1-Apr-08 4:51
led mike1-Apr-08 4:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.