Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing XML Example #43

Open
cpb2948 opened this issue Feb 15, 2017 · 5 comments
Open

Parsing XML Example #43

cpb2948 opened this issue Feb 15, 2017 · 5 comments

Comments

@cpb2948
Copy link

cpb2948 commented Feb 15, 2017

Is it possible to just get a complete example of parsing XML for a specific key using the Facade?

Currently I'm able to convert the whole XML structure into an array using

$xml = Parser::xml($response);

however is there a way to specific pull keys? Using the documentation it would be something like

Parser::get('key', 'default value');

but I don't know how to tie it all together.

Thanks

@danhunsaker
Copy link
Contributor

Please read through the other most recent issues. This topic has come up a lot in the last week or so.

@Tommixoft
Copy link

Yeah documentation SUCKS.
cannot figure out how to use get function.

@danhunsaker
Copy link
Contributor

Basically, Parser::get(), along with all the other helper methods, can only look at the HTTP request body. If the data you want to parse isn't in there, you can't use the helpers. They cannot be used on variables.

@Tommixoft
Copy link

OH.... now it's more logic. I think you should add this info near function description or in documentation.

@danhunsaker
Copy link
Contributor

Agreed.

(Note: this explanation had already been given in other, older issues.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants