Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Josh Fake

#16
Thank you Allen!

I will try this as I have never worked directly with the xml() function and see if this will work.  I have about 30 of these I have to navigate through so I will probably have to add a switch/case/end switch while transversing through all the question sub-nodes.  But I will definitely try this.

I was just hoping there would be a way to handle this via the xml class find_node() method.  Most of the methods I use in the MS Com Object are easily converted to a method within the*obj/XML interface with the exception of this one. I'll add this as an "enhancement request".
#17
To All:

I am in the process of moving away from the MS XML Parser MSXML2.DomDocument and replacing with the native XML object parser *obj/XML.  95% of the code is easily interpreted from using the MS COM Object to the Pvx Parser, but this last issue.

I have an incoming XML response from a webservice (this is just a "small snippet") with a list of a very large of Question Subnodes within the Question Node.

<Questions Level="Product">
    <Question Name="SpecialtyShape">
        <Answer>None</Answer>
    </Question>
    <Question Name="MV_ConfigIDListVisual">
        <Answer>1340</Answer>
        <Answer>1348</Answer>
    </Question>
    <Question Name="PricingGroup">
        <Answer>L06</Answer>
    </Question>
    <Question Name="Shape">
        <Answer>Rectangular</Answer>
    </Question>
    <Question Name="InsectScreen">
        <Answer>No</Answer>
    </Question>
    <Question Name="ConfigIDAccessoryGrid">
        <Answer>-29</Answer>
    </Question>
    <Question Name="NetPriceExtended">
        <Answer>2951.10</Answer>
    </Question>
    <Question Name="InsectScreenMaterial">
        <Answer>N/A</Answer>
    </Question>
</Questions>

Within the MSXML DOM Document I could easily find a Question based on the Name attributes value.
shape_node=xml'selectsinglenode("Questions/Question[@Name=""Shape""]")
shape$=shape_node'getelementsbytagname(""Answer"")'item(0)'text$

Is there any method within the PxPlus XML object to find a node based on an attributes' value as it can be achieved in the MS XML Object?
I could loop through all questions (almost 200) and create a memory file using the Name of the Question as the primary key, but that would involve more changes than I was hoping to make, I justed was hoping to replace the object so the code was not limited to a windows o/s.

Thanks for any and all help ahead of time