Gitter.im

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Gitter.im

decorior

xml_data worked really well in lasso 8

But there seems to be no equivalent in lasso 9.

The XML instructions do not seem to help.

I am not sure the best way to traverse an xml_tree easily

Does anyone have any examples?

Deco


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

Ke Carlton-3
Use xpath with xml->extract, it woks really well:

with node in #xml->extract('//item') do {
   // each #node is an <item> element
}

Much more flexible and faster than the convert to map approach...

Ke



On Sun, Dec 13, 2015 at 7:06 AM deco rior <[hidden email]> wrote:

>
> xml_data worked really well in lasso 8
>
> But there seems to be no equivalent in lasso 9.
>
> The XML instructions do not seem to help.
>
> I am not sure the best way to traverse an xml_tree easily
>
> Does anyone have any examples?
>
> Deco
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

Jolle Carlestam-2
In reply to this post by decorior

> 12 dec 2015 kl. 19:05 skrev deco rior <[hidden email]>:
>
>
> xml_data worked really well in lasso 8
>
> But there seems to be no equivalent in lasso 9.
>
> The XML instructions do not seem to help.
>
> I am not sure the best way to traverse an xml_tree easily
>
> Does anyone have any examples?
>
> Deco


I don’t really have any examples. Trying not to touch XML although we did some of that at Amtac. Think Ke’s response is what you ned to do.
However I do wonder about your choice of subject line? Fail to see the connection between it and the actual question? :-)

HDB
Jolle

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

decorior
Hi, Jolle:

I was originally going to comment on the lack of activity in the gitter feed.

and then ask my question.

But I think gitter may be having some trouble with updates.

Deco

> On Dec 13, 2015, at 2:06 AM, Jolle Carlestam <[hidden email]> wrote:
>
>
>> 12 dec 2015 kl. 19:05 skrev deco rior <[hidden email]>:
>>
>>
>> xml_data worked really well in lasso 8
>>
>> But there seems to be no equivalent in lasso 9.
>>
>> The XML instructions do not seem to help.
>>
>> I am not sure the best way to traverse an xml_tree easily
>>
>> Does anyone have any examples?
>>
>> Deco
>
>
> I don’t really have any examples. Trying not to touch XML although we did some of that at Amtac. Think Ke’s response is what you ned to do.
> However I do wonder about your choice of subject line? Fail to see the connection between it and the actual question? :-)
>
> HDB
> Jolle
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

Mason Miller
In reply to this post by Ke Carlton-3
If you are dealing with xml, taking the time to know XPath is well worth it.

Mason

Sent from my iPhone

> On Dec 12, 2015, at 5:28 PM, Ke Carlton <[hidden email]> wrote:
>
> Use xpath with xml->extract, it woks really well:
>
> with node in #xml->extract('//item') do {
>   // each #node is an <item> element
> }
>
> Much more flexible and faster than the convert to map approach...
>
> Ke
>
>
>
>> On Sun, Dec 13, 2015 at 7:06 AM deco rior <[hidden email]> wrote:
>>
>>
>> xml_data worked really well in lasso 8
>>
>> But there seems to be no equivalent in lasso 9.
>>
>> The XML instructions do not seem to help.
>>
>> I am not sure the best way to traverse an xml_tree easily
>>
>> Does anyone have any examples?
>>
>> Deco
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

decorior
Thanks!


I am gettign back to this.. I have the following soap statement

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetCustomerProfile xmlns="https://api.authorize.net/soap/v1/">
<merchantAuthentication>
<name>abcdef</name>
<transactionKey>123456</transactionKey>
</merchantAuthentication>
<customerProfileId>1000</customerProfileId>
</GetCustomerProfile>
</soap:Body>
</soap:Envelope>


i started playing with xPath

so this works fine

/soap:Envelope/soap:Body

But why would this not work?

/soap:Envelope/soap:Body/GetCustomerProfile


> On Dec 13, 2015, at 10:03 AM, Mason Miller <[hidden email]> wrote:
>
> If you are dealing with xml, taking the time to know XPath is well worth it.
>
> Mason
>
> Sent from my iPhone
>
>> On Dec 12, 2015, at 5:28 PM, Ke Carlton <[hidden email]> wrote:
>>
>> Use xpath with xml->extract, it woks really well:
>>
>> with node in #xml->extract('//item') do {
>>  // each #node is an <item> element
>> }
>>
>> Much more flexible and faster than the convert to map approach...
>>
>> Ke
>>
>>
>>
>>> On Sun, Dec 13, 2015 at 7:06 AM deco rior <[hidden email]> wrote:
>>>
>>>
>>> xml_data worked really well in lasso 8
>>>
>>> But there seems to be no equivalent in lasso 9.
>>>
>>> The XML instructions do not seem to help.
>>>
>>> I am not sure the best way to traverse an xml_tree easily
>>>
>>> Does anyone have any examples?
>>>
>>> Deco
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

Ke Carlton-3
Just strip out the namespace before working with the XML — it saves lots of
headaches if they're not needed:

#rawxml->replace('xmlns=','ns=')
// Do stuff with xpath

Ke


On Wed, Jan 6, 2016 at 12:23 PM deco rior <[hidden email]> wrote:

> Thanks!
>
>
> I am gettign back to this.. I have the following soap statement
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <GetCustomerProfile xmlns="https://api.authorize.net/soap/v1/">
> <merchantAuthentication>
> <name>abcdef</name>
> <transactionKey>123456</transactionKey>
> </merchantAuthentication>
> <customerProfileId>1000</customerProfileId>
> </GetCustomerProfile>
> </soap:Body>
> </soap:Envelope>
>
>
> i started playing with xPath
>
> so this works fine
>
> /soap:Envelope/soap:Body
>
> But why would this not work?
>
> /soap:Envelope/soap:Body/GetCustomerProfile
>
>
> > On Dec 13, 2015, at 10:03 AM, Mason Miller <[hidden email]>
> wrote:
> >
> > If you are dealing with xml, taking the time to know XPath is well worth
> it.
> >
> > Mason
> >
> > Sent from my iPhone
> >
> >> On Dec 12, 2015, at 5:28 PM, Ke Carlton <[hidden email]> wrote:
> >>
> >> Use xpath with xml->extract, it woks really well:
> >>
> >> with node in #xml->extract('//item') do {
> >>  // each #node is an <item> element
> >> }
> >>
> >> Much more flexible and faster than the convert to map approach...
> >>
> >> Ke
> >>
> >>
> >>
> >>> On Sun, Dec 13, 2015 at 7:06 AM deco rior <[hidden email]>
> wrote:
> >>>
> >>>
> >>> xml_data worked really well in lasso 8
> >>>
> >>> But there seems to be no equivalent in lasso 9.
> >>>
> >>> The XML instructions do not seem to help.
> >>>
> >>> I am not sure the best way to traverse an xml_tree easily
> >>>
> >>> Does anyone have any examples?
> >>>
> >>> Deco
> >>>
> >>>
> >>> #############################################################
> >>>
> >>> This message is sent to you because you are subscribed to
> >>> the mailing list Lasso [hidden email]
> >>> Official list archives available at http://www.lassotalk.com
> >>> To unsubscribe, E-mail to: <[hidden email]>
> >>> Send administrative queries to  <[hidden email]>
> >>
> >> #############################################################
> >>
> >> This message is sent to you because you are subscribed to
> >> the mailing list Lasso [hidden email]
> >> Official list archives available at http://www.lassotalk.com
> >> To unsubscribe, E-mail to: <[hidden email]>
> >> Send administrative queries to  <[hidden email]>
> >
> >
> > #############################################################
> >
> > This message is sent to you because you are subscribed to
> >  the mailing list Lasso [hidden email]
> > Official list archives available at http://www.lassotalk.com
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

decorior
Getting closer, but I must be missing something

I run the code below on some authorize.net XML that is returned

with node in xml(#xmls)->extract('//order')
do {^
#node
#node->nodeName
#node->nodeValue
^}

Here is my result:

<order>
  <invoicenumber>06201601063148-6448</invoicenumber>
</order>
order
06201601063148-6448

I understand the node, and the name, but the value does not seem like it makes sense, but ok...

But then I run

with node in xml(#xmls)->extract('//invoicenumber')
do {^
#node
#node->nodeName
#node->nodeValue
^}


In this case I get nothing returned?

I was thinking this should give me

<invoicenumber>06201601063148-6448</invoicenumber>
invoicenumber
06201601063148-6448



> On Jan 5, 2016, at 5:13 PM, Ke Carlton <[hidden email]> wrote:
>
> Just strip out the namespace before working with the XML — it saves lots of
> headaches if they're not needed:
>
> #rawxml->replace('xmlns=','ns=')
> // Do stuff with xpath
>
> Ke
>
>
> On Wed, Jan 6, 2016 at 12:23 PM deco rior <[hidden email]> wrote:
>
>> Thanks!
>>
>>
>> I am gettign back to this.. I have the following soap statement
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
>> http://www.w3.org/2001/XMLSchema">
>> <soap:Body>
>> <GetCustomerProfile xmlns="https://api.authorize.net/soap/v1/">
>> <merchantAuthentication>
>> <name>abcdef</name>
>> <transactionKey>123456</transactionKey>
>> </merchantAuthentication>
>> <customerProfileId>1000</customerProfileId>
>> </GetCustomerProfile>
>> </soap:Body>
>> </soap:Envelope>
>>
>>
>> i started playing with xPath
>>
>> so this works fine
>>
>> /soap:Envelope/soap:Body
>>
>> But why would this not work?
>>
>> /soap:Envelope/soap:Body/GetCustomerProfile
>>
>>
>>> On Dec 13, 2015, at 10:03 AM, Mason Miller <[hidden email]>
>> wrote:
>>>
>>> If you are dealing with xml, taking the time to know XPath is well worth
>> it.
>>>
>>> Mason
>>>
>>> Sent from my iPhone
>>>
>>>> On Dec 12, 2015, at 5:28 PM, Ke Carlton <[hidden email]> wrote:
>>>>
>>>> Use xpath with xml->extract, it woks really well:
>>>>
>>>> with node in #xml->extract('//item') do {
>>>> // each #node is an <item> element
>>>> }
>>>>
>>>> Much more flexible and faster than the convert to map approach...
>>>>
>>>> Ke
>>>>
>>>>
>>>>
>>>>> On Sun, Dec 13, 2015 at 7:06 AM deco rior <[hidden email]>
>> wrote:
>>>>>
>>>>>
>>>>> xml_data worked really well in lasso 8
>>>>>
>>>>> But there seems to be no equivalent in lasso 9.
>>>>>
>>>>> The XML instructions do not seem to help.
>>>>>
>>>>> I am not sure the best way to traverse an xml_tree easily
>>>>>
>>>>> Does anyone have any examples?
>>>>>
>>>>> Deco
>>>>>
>>>>>
>>>>> #############################################################
>>>>>
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

decorior
One other strange thing I just discovered.

If I copy the output back form Authorize.net and paste it as a string in my code everything works as expected.

Could there by hidden characters being return that mess this up?

> On Jan 7, 2016, at 5:32 PM, deco rior <[hidden email]> wrote:
>
> Getting closer, but I must be missing something
>
> I run the code below on some authorize.net XML that is returned
>
> with node in xml(#xmls)->extract('//order')
> do {^
> #node
> #node->nodeName
> #node->nodeValue
> ^}
>
> Here is my result:
>
> <order>
>  <invoicenumber>06201601063148-6448</invoicenumber>
> </order>
> order
> 06201601063148-6448
>
> I understand the node, and the name, but the value does not seem like it makes sense, but ok...
>
> But then I run
>
> with node in xml(#xmls)->extract('//invoicenumber')
> do {^
> #node
> #node->nodeName
> #node->nodeValue
> ^}
>
>
> In this case I get nothing returned?
>
> I was thinking this should give me
>
> <invoicenumber>06201601063148-6448</invoicenumber>
> invoicenumber
> 06201601063148-6448
>
>
>
>> On Jan 5, 2016, at 5:13 PM, Ke Carlton <[hidden email]> wrote:
>>
>> Just strip out the namespace before working with the XML — it saves lots of
>> headaches if they're not needed:
>>
>> #rawxml->replace('xmlns=','ns=')
>> // Do stuff with xpath
>>
>> Ke
>>
>>
>> On Wed, Jan 6, 2016 at 12:23 PM deco rior <[hidden email]> wrote:
>>
>>> Thanks!
>>>
>>>
>>> I am gettign back to this.. I have the following soap statement
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
>>> http://www.w3.org/2001/XMLSchema">
>>> <soap:Body>
>>> <GetCustomerProfile xmlns="https://api.authorize.net/soap/v1/">
>>> <merchantAuthentication>
>>> <name>abcdef</name>
>>> <transactionKey>123456</transactionKey>
>>> </merchantAuthentication>
>>> <customerProfileId>1000</customerProfileId>
>>> </GetCustomerProfile>
>>> </soap:Body>
>>> </soap:Envelope>
>>>
>>>
>>> i started playing with xPath
>>>
>>> so this works fine
>>>
>>> /soap:Envelope/soap:Body
>>>
>>> But why would this not work?
>>>
>>> /soap:Envelope/soap:Body/GetCustomerProfile
>>>
>>>
>>>> On Dec 13, 2015, at 10:03 AM, Mason Miller <[hidden email]>
>>> wrote:
>>>>
>>>> If you are dealing with xml, taking the time to know XPath is well worth
>>> it.
>>>>
>>>> Mason
>>>>
>>>> Sent from my iPhone
>>>>
>>>>> On Dec 12, 2015, at 5:28 PM, Ke Carlton <[hidden email]> wrote:
>>>>>
>>>>> Use xpath with xml->extract, it woks really well:
>>>>>
>>>>> with node in #xml->extract('//item') do {
>>>>> // each #node is an <item> element
>>>>> }
>>>>>
>>>>> Much more flexible and faster than the convert to map approach...
>>>>>
>>>>> Ke
>>>>>
>>>>>
>>>>>
>>>>>> On Sun, Dec 13, 2015 at 7:06 AM deco rior <[hidden email]>
>>> wrote:
>>>>>>
>>>>>>
>>>>>> xml_data worked really well in lasso 8
>>>>>>
>>>>>> But there seems to be no equivalent in lasso 9.
>>>>>>
>>>>>> The XML instructions do not seem to help.
>>>>>>
>>>>>> I am not sure the best way to traverse an xml_tree easily
>>>>>>
>>>>>> Does anyone have any examples?
>>>>>>
>>>>>> Deco
>>>>>>
>>>>>>
>>>>>> #############################################################
>>>>>>
>>>>>> This message is sent to you because you are subscribed to
>>>>>> the mailing list Lasso [hidden email]
>>>>>> Official list archives available at http://www.lassotalk.com
>>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>>> Send administrative queries to  <[hidden email]>
>>>>>
>>>>> #############################################################
>>>>>
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

Mason Miller
In reply to this post by decorior
How about //invoicenumber/text()

?

Sent from my iPhone

> On Jan 7, 2016, at 7:32 PM, deco rior <[hidden email]> wrote:
>
> Getting closer, but I must be missing something
>
> I run the code below on some authorize.net XML that is returned
>
> with node in xml(#xmls)->extract('//order')
> do {^
> #node
> #node->nodeName
> #node->nodeValue
> ^}
>
> Here is my result:
>
> <order>
>  <invoicenumber>06201601063148-6448</invoicenumber>
> </order>
> order
> 06201601063148-6448
>
> I understand the node, and the name, but the value does not seem like it makes sense, but ok...
>
> But then I run
>
> with node in xml(#xmls)->extract('//invoicenumber')
> do {^
> #node
> #node->nodeName
> #node->nodeValue
> ^}
>
>
> In this case I get nothing returned?
>
> I was thinking this should give me
>
> <invoicenumber>06201601063148-6448</invoicenumber>
> invoicenumber
> 06201601063148-6448
>
>
>
>> On Jan 5, 2016, at 5:13 PM, Ke Carlton <[hidden email]> wrote:
>>
>> Just strip out the namespace before working with the XML — it saves lots of
>> headaches if they're not needed:
>>
>> #rawxml->replace('xmlns=','ns=')
>> // Do stuff with xpath
>>
>> Ke
>>
>>
>>> On Wed, Jan 6, 2016 at 12:23 PM deco rior <[hidden email]> wrote:
>>>
>>> Thanks!
>>>
>>>
>>> I am gettign back to this.. I have the following soap statement
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
>>> http://www.w3.org/2001/XMLSchema">
>>> <soap:Body>
>>> <GetCustomerProfile xmlns="https://api.authorize.net/soap/v1/">
>>> <merchantAuthentication>
>>> <name>abcdef</name>
>>> <transactionKey>123456</transactionKey>
>>> </merchantAuthentication>
>>> <customerProfileId>1000</customerProfileId>
>>> </GetCustomerProfile>
>>> </soap:Body>
>>> </soap:Envelope>
>>>
>>>
>>> i started playing with xPath
>>>
>>> so this works fine
>>>
>>> /soap:Envelope/soap:Body
>>>
>>> But why would this not work?
>>>
>>> /soap:Envelope/soap:Body/GetCustomerProfile
>>>
>>>
>>>>> On Dec 13, 2015, at 10:03 AM, Mason Miller <[hidden email]>
>>>> wrote:
>>>>
>>>> If you are dealing with xml, taking the time to know XPath is well worth
>>> it.
>>>>
>>>> Mason
>>>>
>>>> Sent from my iPhone
>>>>
>>>>> On Dec 12, 2015, at 5:28 PM, Ke Carlton <[hidden email]> wrote:
>>>>>
>>>>> Use xpath with xml->extract, it woks really well:
>>>>>
>>>>> with node in #xml->extract('//item') do {
>>>>> // each #node is an <item> element
>>>>> }
>>>>>
>>>>> Much more flexible and faster than the convert to map approach...
>>>>>
>>>>> Ke
>>>>>
>>>>>
>>>>>
>>>>>> On Sun, Dec 13, 2015 at 7:06 AM deco rior <[hidden email]>
>>> wrote:
>>>>>>
>>>>>>
>>>>>> xml_data worked really well in lasso 8
>>>>>>
>>>>>> But there seems to be no equivalent in lasso 9.
>>>>>>
>>>>>> The XML instructions do not seem to help.
>>>>>>
>>>>>> I am not sure the best way to traverse an xml_tree easily
>>>>>>
>>>>>> Does anyone have any examples?
>>>>>>
>>>>>> Deco
>>>>>>
>>>>>>
>>>>>> #############################################################
>>>>>>
>>>>>> This message is sent to you because you are subscribed to
>>>>>> the mailing list Lasso [hidden email]
>>>>>> Official list archives available at http://www.lassotalk.com
>>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>>> Send administrative queries to  <[hidden email]>
>>>>>
>>>>> #############################################################
>>>>>
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Gitter.im

Mason Miller
And there probably not be a nodeName returned.

Mason

Sent from my iPhone

> On Jan 8, 2016, at 4:40 PM, Mason Miller <[hidden email]> wrote:
>
> How about //invoicenumber/text()
>
> ?
>
> Sent from my iPhone
>
>> On Jan 7, 2016, at 7:32 PM, deco rior <[hidden email]> wrote:
>>
>> Getting closer, but I must be missing something
>>
>> I run the code below on some authorize.net XML that is returned
>>
>> with node in xml(#xmls)->extract('//order')
>> do {^
>> #node
>> #node->nodeName
>> #node->nodeValue
>> ^}
>>
>> Here is my result:
>>
>> <order>
>> <invoicenumber>06201601063148-6448</invoicenumber>
>> </order>
>> order
>> 06201601063148-6448
>>
>> I understand the node, and the name, but the value does not seem like it makes sense, but ok...
>>
>> But then I run
>>
>> with node in xml(#xmls)->extract('//invoicenumber')
>> do {^
>> #node
>> #node->nodeName
>> #node->nodeValue
>> ^}
>>
>>
>> In this case I get nothing returned?
>>
>> I was thinking this should give me
>>
>> <invoicenumber>06201601063148-6448</invoicenumber>
>> invoicenumber
>> 06201601063148-6448
>>
>>
>>
>>> On Jan 5, 2016, at 5:13 PM, Ke Carlton <[hidden email]> wrote:
>>>
>>> Just strip out the namespace before working with the XML — it saves lots of
>>> headaches if they're not needed:
>>>
>>> #rawxml->replace('xmlns=','ns=')
>>> // Do stuff with xpath
>>>
>>> Ke
>>>
>>>
>>>> On Wed, Jan 6, 2016 at 12:23 PM deco rior <[hidden email]> wrote:
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> I am gettign back to this.. I have the following soap statement
>>>>
>>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
>>>> http://www.w3.org/2001/XMLSchema">
>>>> <soap:Body>
>>>> <GetCustomerProfile xmlns="https://api.authorize.net/soap/v1/">
>>>> <merchantAuthentication>
>>>> <name>abcdef</name>
>>>> <transactionKey>123456</transactionKey>
>>>> </merchantAuthentication>
>>>> <customerProfileId>1000</customerProfileId>
>>>> </GetCustomerProfile>
>>>> </soap:Body>
>>>> </soap:Envelope>
>>>>
>>>>
>>>> i started playing with xPath
>>>>
>>>> so this works fine
>>>>
>>>> /soap:Envelope/soap:Body
>>>>
>>>> But why would this not work?
>>>>
>>>> /soap:Envelope/soap:Body/GetCustomerProfile
>>>>
>>>>
>>>>>> On Dec 13, 2015, at 10:03 AM, Mason Miller <[hidden email]>
>>>>> wrote:
>>>>>
>>>>> If you are dealing with xml, taking the time to know XPath is well worth
>>>> it.
>>>>>
>>>>> Mason
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>>> On Dec 12, 2015, at 5:28 PM, Ke Carlton <[hidden email]> wrote:
>>>>>>
>>>>>> Use xpath with xml->extract, it woks really well:
>>>>>>
>>>>>> with node in #xml->extract('//item') do {
>>>>>> // each #node is an <item> element
>>>>>> }
>>>>>>
>>>>>> Much more flexible and faster than the convert to map approach...
>>>>>>
>>>>>> Ke
>>>>>>
>>>>>>
>>>>>>
>>>>>>> On Sun, Dec 13, 2015 at 7:06 AM deco rior <[hidden email]>
>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> xml_data worked really well in lasso 8
>>>>>>>
>>>>>>> But there seems to be no equivalent in lasso 9.
>>>>>>>
>>>>>>> The XML instructions do not seem to help.
>>>>>>>
>>>>>>> I am not sure the best way to traverse an xml_tree easily
>>>>>>>
>>>>>>> Does anyone have any examples?
>>>>>>>
>>>>>>> Deco
>>>>>>>
>>>>>>>
>>>>>>> #############################################################
>>>>>>>
>>>>>>> This message is sent to you because you are subscribed to
>>>>>>> the mailing list Lasso [hidden email]
>>>>>>> Official list archives available at http://www.lassotalk.com
>>>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>>>> Send administrative queries to  <[hidden email]>
>>>>>>
>>>>>> #############################################################
>>>>>>
>>>>>> This message is sent to you because you are subscribed to
>>>>>> the mailing list Lasso [hidden email]
>>>>>> Official list archives available at http://www.lassotalk.com
>>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>>> Send administrative queries to  <[hidden email]>
>>>>>
>>>>>
>>>>> #############################################################
>>>>>
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>