Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. splitting the xmlnode based on nodelength

splitting the xmlnode based on nodelength

Scheduled Pinned Locked Moved XML / XSL
xml
4 Posts 3 Posters 19 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harinit
    wrote on last edited by
    #1

    Hi, My Sample XML is as follows:

    Now i need to prepare XSLT such that if nodes are more than 3 then i need to get only roll and studname nodes.

    I need to get the result as

    Please provide me the required XSLT such that i need to get the above output... Thanks in advance Harini

    L W 2 Replies Last reply
    0
    • H harinit

      Hi, My Sample XML is as follows:

      Now i need to prepare XSLT such that if nodes are more than 3 then i need to get only roll and studname nodes.

      I need to get the result as

      Please provide me the required XSLT such that i need to get the above output... Thanks in advance Harini

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I don't understand;

      harinit wrote:

      if nodes are more than 3

      From your input and output it looks as if you are doing nothing more than removing all the ClassX nodes.

      Every man can tell how many goats or sheep he possesses, but not how many friends.

      H 1 Reply Last reply
      0
      • L Lost User

        I don't understand;

        harinit wrote:

        if nodes are more than 3

        From your input and output it looks as if you are doing nothing more than removing all the ClassX nodes.

        Every man can tell how many goats or sheep he possesses, but not how many friends.

        H Offline
        H Offline
        harinit
        wrote on last edited by
        #3

        Hi i am sorry for not explaining correctly... My sample xml is as follows:

        We need to get the length of xml node including child nodes. Suppose if the length of xml exceeds the configured length then it should be formatted as small xml file with root elements. Example: consider the node(including child nodes) exceedes the length 100 then we should format the xml as given below using XSLT.

        1 Reply Last reply
        0
        • H harinit

          Hi, My Sample XML is as follows:

          Now i need to prepare XSLT such that if nodes are more than 3 then i need to get only roll and studname nodes.

          I need to get the result as

          Please provide me the required XSLT such that i need to get the above output... Thanks in advance Harini

          W Offline
          W Offline
          woopsydoozy
          wrote on last edited by
          #4
          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups