How to get XML child number

In AS2 you could use numChildren to get the number of
children in a given XML file, whats the equivalent in AS3? Ive
tried using var myNum:Number = myXMLname.numChildren , but when I
trace it I just get 0.
Thanks

You need to call a method these days:
Say you have an XML Object like the following:
var myXMLExample:XML =
<EXAMPLE>
<ITEM>
<FRUIT>Apple</FRUIT>
</ITEM>
<ITEM>
<FRUIT>Kiwi</FRUIT>
</ITEM>
<ITEM>
<ANIMAL>Fruitbat</ANIMAL>
</ITEM>
</EXAMPLE>
trace(myXMLExample.ITEM.length()); //since there are three
ITEMS
trace(myXMLExample.ITEM.FRUIT.length()); //since there are
only two ITEMS with FRUIT
//first trace gives you: 3
//second trace gives you: 2

Similar Messages

  • How to get a random number in a range?

    as title
    how to get a random number in a range?
    like 2000~3000 thks :)

    int between 10 and 20 with the method Math.random():
    public class Rnd
         // Test
         public static void main(String[] args)
             int start=10, end = 30;
             for (int i = 0; i < 10; i++)
                int n = (int)(start + Math.random() * (end-start));
                System.out.println(n);
    }best regards.

  • How to get the total number of pages printed in a report?

    Hi All,
    I have a requirement where I need to print a frame of fields only in the last page. Unfortunately I cannot use the 'Print Object On' property as it doesnt work in my case. So, I am planning to write a format trigger on the frame to return TRUE if the page is the last physical page. Now, I need to know how to get the total number of physical pages that will get printed in the report so that I can use this to manipulate the frame. I was planning to use the 'Total Physical Pages' built-in, but it seems like I can just use it to print in a field and I can't use this field's value anywhere in the plsql code (formula column function/format trigger) in the report. Is there anyway to get the total number of pages printed in the report which can be used in the report plsql code?
    Thanks,
    Srini.

    i found the solution, thanks

  • How to get the page number in the break section?

    Hi expert,
    The user wants the page number came right after the Break group name if the break section contains more than 1 page. E.g.
    ABC Compnay
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 1
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 2
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    CDE Company
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    How to get the page number in section break level?

    Hi Wes
    * Create a Field on the margin.
    * Set its "Source" to "Page Number"/"Physical Page Number".
    * Click "Page Numbering" button.
    * In "Reset At" list box, choose the Repeating frame that surrounds your detail group in the layout.
    This should cause Reports to increment the page number until the "Company" repeating frame resets.
    Regards
    Sripathy

  • How to get payment document number from paid column in monthly invoice

    Dear experts
    I use SBO japan version and i need to know how to get payment document number from paid column in monthly invoice ?
    in table MIN1, only contain invoice and credit note document number, there is no payment document number
    thank you for your help
    Best Regards
    JeiMing

    Dear Gordon
    Yeah, you are right, i can use field MIentry in RCT2
    thank you
    Best regards
    jeiming

  • How to get purchase order number from delivery number?

    hi all,
    how to get purchase order number and item if i have only delivery.
    and in same way how to get po number and item if i know only batch number.
    kindly give me some solution i need this urgently.
    thanks in advance.

    Check the logic below:
    * Selecting the Sales Documents from VBFA for corresponding Invoice
        SELECT vbelv
                     posnv
          FROM vbfa
          INTO TABLE gt_itab3
         WHERE vbeln EQ gt_itab5-vbeln
           AND posnn EQ gt_itab5-posnr
           AND vbtyp_n EQ 'J'.
        IF sy-subrc EQ zero.
          SORT gt_itab3 BY vbelv posnv.
        ENDIF.
      ENDIF.
      IF NOT gt_itab3 IS INITIAL.
    * Selecting the Purchase Orders from VBFA for corresponding Sales Documents
        SELECT vbeln
               posnn
          FROM vbfa
          INTO TABLE gt_itab4
       FOR ALL ENTRIES IN gt_itab3
         WHERE vbelv EQ gt_itab3-vbelv
           AND posnv EQ gt_itab3-posnv
           AND vbtyp_n EQ 'V'.
        IF sy-subrc EQ 0.
          SORT gt_itab4 BY vbeln posnn.
        ENDIF.
      ENDIF.
    Batch number will be there in delivery item.
    Regards
    Kannaiah

  • How to get Contract Account Number in Service Ticket

    Hi Experts,
    How to get Contract account number in Service Ticket, we are working in ISU environment. when i create the service ticket the contract account number is there in Business agreement number field in service tiket.
    Can anyone tell me how to retrieve that field.
    Answer will be appreciated.
    Praveen

    check tables tfk_buag_ref and fkkvkp

  • How to get the Page Number in CS3 with VB?

    Hi, Everybody
    I use the Visual Basic to read the words and their page number where the Words are at. I want to do it according to Story. Some TextFrame of the Story waw placed in other pages: How can I get the Page number according to the Word that is selected?
    For myStoryCounter = 1 to Document.Stories.Count
    Set myStory = Document.Stories.Item(myStoryCounter)
    For myWordCounter = 1 to myStory.Words.Count
    Set myWord = myStory.Words.Item(myWordCounter)
    myWordContents = myWord.Contents
    Rem ** How to Get the Page Number according to the Word ***
    Next
    Next

    > But I don't understand why Item(1) are set.
    because Word can have more than one parent TextFrame - when split across TextFrames
    only Character have one ParentTextFrame accessed also by ParentTextFrames.Item(1)
    > why Story.TextFrames.Count alway is 0, Is it bug?
    no - it's not bug
    in older IDs - Story.TextFrames collection refer to all TextFrames as containers for Story text
    but in CS3 - collection Story.TextFrames contain all TextFrames inserted as InLine/Anchored objects - same like Story.Rectangles or Story.Ovals
    in CS3 - when you want to refer to TextFrames as containers for Story text - you need to use Story.TextContainers - because now you can link TextFrame and Text-On-Path as Story - Text-On-Path isn't TextFrame
    robin
    www.adobescripts.com

  • How to Get last page number in report 10g

    I want to get last page number in report but Current page number found from srw.get_page_num(n)
    but i want to get last page number for conditional formating like this
    srw.get_page_num(current_page)=last_page
    pls help me how can get last page number;
    pls help;
    thanks in advanced;

    Hi,
    you can use the Property Print Object On for this.
    Regards
    Rainer

  • How to get the document number for a ware house order.

    Hello gurus,
    how to get the document number for a ware house order. [if GI is posted refering that WH order] .. is there any report?
    Thanks in advance

    There are several options.  When you post a Goods Movement, you can use LB12 -display Transfer Requirement for material document or LB11 Display TR for material.
    Depending on how your system is set up you may have gotten a Transfer Order automcatically.  In this case you can look at LT24 - Transfer Order for material.

  • I'm trying to load a student version of Acrobat XI Pro but not sure how to get the serial number to validate I'm a student

    I'm trying to load a student version of Acrobat XI Pro but not sure how to get the serial number to validate I'm a student

    Hi ,
    Could you please tell me form where did you purchase the Student version of Acrobat ?Is it through Adobe or some outside vendor ?
    Is it the first time you are trying to access it ?
    If yes ,then you must have received your serial number along with your product .
    If not ,then how how did you manage to get your serial number and access Acrobat before ?
    Regards
    Sukrit Dhingra

  • How to get/view document number for KP06 Planning upload

    Hi,
    I have uploaded excel for Cost center/cost element Planning in KP06 using exccel planning.Now i want the document number which for which i have posted in KP06-Plan values using excel upload.
    Kindly advice me how to get the document number for CO-OM(Cost center/Cost element planning) in KP06?
    Thanks
    Supriya

    Hello,
    Please execute report KSBL. It should be useful.
    Regards,
    Ravi

  • How to get XML form.

    Hi All,
    Can anybody suggest me how to get XML file of System form.
    Means i want XML file of Sales order. Where i get it ?
    Thanks,

    Hi Harish,
    Lets try this code.It will solve ur problem.
    Public Class SystemForm
          Private WithEvents SBO_Application As SAPbouiCOM.Application
        Private oOrderForm As SAPbouiCOM.Form
        Private oNewItem As SAPbouiCOM.Item
        Private oItem As SAPbouiCOM.Item
        Private oFolderItem As SAPbouiCOM.Folder
        Private oOptionBtn As SAPbouiCOM.OptionBtn
        Private oCheckBox As SAPbouiCOM.CheckBox
        Private i As Integer
        Private Sub SetApplication()
            Dim SboGuiApi As SAPbouiCOM.SboGuiApi
            Dim sConnectionString As String
            SboGuiApi = New SAPbouiCOM.SboGuiApi()
            sConnectionString = Command     
            SboGuiApi.Connect(sConnectionString)   
            SBO_Application = SboGuiApi.GetApplication()
        End Sub
        Private Sub AddItemsToOrderForm()     
            oOrderForm.DataSources.UserDataSources.Add("OpBtnDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
            oOrderForm.DataSources.UserDataSources.Add("CheckDS1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
            oOrderForm.DataSources.UserDataSources.Add("CheckDS2", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
            oOrderForm.DataSources.UserDataSources.Add("CheckDS3", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
    oItem = oOrderForm.Items.Item("126")
    For i = 1 To 3
                oNewItem = oOrderForm.Items.Add("CheckBox" & i, SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
                oNewItem.Left = oItem.Left
                oNewItem.Width = 100
                oNewItem.Top = oItem.Top + (i - 1) * 19
                oNewItem.Height = 19           
                oNewItem.FromPane = 5
                oNewItem.ToPane = 5
                oCheckBox = oNewItem.Specific           
                oCheckBox.Caption = "Check Box" & i            '
                oCheckBox.DataBind.SetBound(True, "", "CheckDS" & i)
            Next i
            oItem = oOrderForm.Items.Item("44")
            For i = 1 To 3
                oNewItem = oOrderForm.Items.Add("OpBtn" & i, SAPbouiCOM.BoFormItemTypes.it_OPTION_BUTTON)
                oNewItem.Left = oItem.Left
                oNewItem.Width = 100
                oNewItem.Top = oItem.Top + (i - 1) * 19
                oNewItem.Height = 19         
                oNewItem.FromPane = 5
                oNewItem.ToPane = 5
                oOptionBtn = oNewItem.Specific    
                oOptionBtn.Caption = "Option Button" & i
                If i > 1 Then
                    oOptionBtn.GroupWith("OpBtn" & i - 1)
                End If
                oOptionBtn.DataBind.SetBound(True, "", "OpBtnDS")
            Next i
        End Sub
        Public Sub New()
            MyBase.New()
            SetApplication()
           End Sub
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
    If ((pVal.FormType = 139 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then           
    oOrderForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
    If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
    oNewItem = oOrderForm.Items.Add("UserFolder", SAPbouiCOM.BoFormItemTypes.it_FOLDER)               
                    oItem = oOrderForm.Items.Item("138")
                    oNewItem.Top = oItem.Top
                    oNewItem.Height = oItem.Height
                    oNewItem.Width = oItem.Width
                    oNewItem.Left = oItem.Left + oItem.Width
                    oFolderItem = oNewItem.Specific
                    oFolderItem.Caption = "User Folder"
                    oFolderItem.GroupWith("138")
                    AddItemsToOrderForm()
                    oOrderForm.PaneLevel = 1
                End If     
    If pVal.ItemUID = "UserFolder" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.Before_Action = True Then              
                    oOrderForm.PaneLevel = 5
                End If
            End If
        End Sub
        Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes)
            Select Case EventType
                Case SAPbouiCOM.BoAppEventTypes.aet_ShutDown
                    SBO_Application.MessageBox("A Shut Down Event has been caught" & _
                        vbNewLine & "Terminating 'Order Form Manipulation' Add On...")
                    End
           End Select
        End Sub
    End Class
    Regards
    Mohana

  • How to get this kind number?

    I have a float number,e.g myfloat=123.34???. When the first "?">=5,
    myfloat=123.35,or myfloat=123.34.Can anyone tell me how to get this kind number.
    Thanks in advance.

    In fact, not very clear of your problem.
    Supposing you want to get fix position's value after ".",
    you could firsly convert it to a string,
    then position "." ,use subString() to get the value.
    compare it, reconvert it back.

  • How to get sales order number before saving in VA01 by using parameter

    Hi,
    Please let me know how to get sales order number in transaction VA01 before saving it by using parameter in SU3.
    I tried to set parameter in SU3 "AUN", but it is not working as required, means sales order number is not appearing before saving.
    can you please suggest how to do it?
    Thanks & Regards.
    Rahul Verulkar

    Hi,
    In case of Support project, we get the high severity issues from users and needs to be closed withn 2 hours... so what we do we get the requirement from user and checking the same in production from our id, but we can not save the sales order as we are not authorized to do the same, so in such cases it is required to get the sales order number before saving... where we can guide the users.... but actuallly it is not getting saved in the table until and unless u save it manually. It works like a material master... when u create material master, the material number appears in advance in material number field "MATNR"
    If it is possible can you please suggest step by step to work on parameter in SU3 for sales order number before saving.
    Thanks & regards,
    Rahul Verulkar

Maybe you are looking for