-1

Here is my XML:

<WebContent diffgr:id="WebContent1" msdata:rowOrder="0">
  <orig_inv_no>73</orig_inv_no>
  <inv_no>141</inv_no>
  <inv_type>S</inv_type>
  <content_type>3</content_type>
  <content_type_desc>Test</content_type_desc>
  <content_value>Sample content</content_value>
 </WebContent>
<WebContent diffgr:id="WebContent2" msdata:rowOrder="0">
  <orig_inv_no>73</orig_inv_no>
  <inv_no>141</inv_no>
  <inv_type>S</inv_type>
  <content_type>3</content_type>
  <content_type_desc>Test</content_type_desc>
  <content_value>Sample content</content_value>
 </WebContent>

I am having a lot of trouble getting the attribute "differ:id" for the node "WebContent"

It seems like it doesn't like the colon in the attribute name. Any Ideas?

0

2 Answers 2

0

the attribute is "diffgr:id" not "differ:id" maybe this is your issue

Sign up to request clarification or add additional context in comments.

Comments

0

Try this:

$xml->WebContent->attributes("diffgr",TRUE)->id;
// TRUE means that `diffgr` is a prefix of the attribute

COuld be found here -> https://stackoverflow.com/a/15546669/2040840

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.