Content-Type: text/html Content-Length: 13769

Origin

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE people>
<!--some comment-->
<people xmlns:first="http://parser.ru/first" xmlns:second="http://parser.ru/second">
		<man first:attrname="attr value">
			<name>ПИФ&amp;</name>
		</man>
	<man id="1" имя="word слово">
		<name>P«AF	B</name>
		<tst:findme xmlns:tst="http://parser.ru/tst">secret</tst:findme>
	</man>
</people>


[9]
     [14]
     [8] some comment
     <people >
         [3]
         <man attrname="attr value" >
             [3]
             <name >
                 [3] ПИФ&
             [3]
            </name>
         [3]
         <man id="1" имя="word слово" >
             [3]
             <name >
                 [3] P«AF B
             [3]
             <findme >
                 [3] secret
             [3]
            </findme>
            </name>
         [3]
        </man>
        </man>
    </people>


attr value

Added attrname2 for last 'man' element

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE people>
<!--some comment-->
<people xmlns:first="http://parser.ru/first" xmlns:second="http://parser.ru/second">
		<man first:attrname="attr value">
			<name>ПИФ&amp;</name>
		</man>
	<man id="1" имя="word слово" second:attrname2="value 2">
		<name>P«AF	B</name>
		<tst:findme xmlns:tst="http://parser.ru/tst">secret</tst:findme>
	</man>
</people>


[9]
     [14]
     [8] some comment
     <people >
         [3]
         <man attrname="attr value" >
             [3]
             <name >
                 [3] ПИФ&
             [3]
            </name>
         [3]
         <man id="1" имя="word слово" attrname2="value 2" >
             [3]
             <name >
                 [3] P«AF B
             [3]
             <findme >
                 [3] secret
             [3]
            </findme>
            </name>
         [3]
        </man>
        </man>
    </people>


Removed attrname for first 'man' element

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE people>
<!--some comment-->
<people xmlns:first="http://parser.ru/first" xmlns:second="http://parser.ru/second">
		<man>
			<name>ПИФ&amp;</name>
		</man>
	<man id="1" имя="word слово" second:attrname2="value 2">
		<name>P«AF	B</name>
		<tst:findme xmlns:tst="http://parser.ru/tst">secret</tst:findme>
	</man>
</people>


[9]
     [14]
     [8] some comment
     <people >
         [3]
         <man >
             [3]
             <name >
                 [3] ПИФ&
             [3]
            </name>
         [3]
         <man id="1" имя="word слово" attrname2="value 2" >
             [3]
             <name >
                 [3] P«AF B
             [3]
             <findme >
                 [3] secret
             [3]
            </findme>
            </name>
         [3]
        </man>
        </man>
    </people>


^x.getAttrinuteNS[...;attrname2]='value 2'
$Attr.nodeValue='value 2'

Changed attrname2 for last 'man' element

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE people>
<!--some comment-->
<people xmlns:first="http://parser.ru/first" xmlns:second="http://parser.ru/second">
		<man>
			<name>ПИФ&amp;</name>
		</man>
	<man id="1" имя="word слово" second:attrname2="changed attribute value">
		<name>P«AF	B</name>
		<tst:findme xmlns:tst="http://parser.ru/tst">secret</tst:findme>
	</man>
</people>


[9]
     [14]
     [8] some comment
     <people >
         [3]
         <man >
             [3]
             <name >
                 [3] ПИФ&
             [3]
            </name>
         [3]
         <man id="1" имя="word слово" attrname2="changed attribute value" >
             [3]
             <name >
                 [3] P«AF B
             [3]
             <findme >
                 [3] secret
             [3]
            </findme>
            </name>
         [3]
        </man>
        </man>
    </people>


right

Added attrname3 for last 'man' element

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE people>
<!--some comment-->
<people xmlns:first="http://parser.ru/first" xmlns:second="http://parser.ru/second">
		<man>
			<name>ПИФ&amp;</name>
		</man>
	<man id="1" имя="word слово" second:attrname2="changed attribute value" third:attrname3="value3">
		<name>P«AF	B</name>
		<tst:findme xmlns:tst="http://parser.ru/tst">secret</tst:findme>
	</man>
</people>


[9]
     [14]
     [8] some comment
     <people >
         [3]
         <man >
             [3]
             <name >
                 [3] ПИФ&
             [3]
            </name>
         [3]
         <man id="1" имя="word слово" attrname2="changed attribute value" attrname3="value3" >
             [3]
             <name >
                 [3] P«AF B
             [3]
             <findme >
                 [3] secret
             [3]
            </findme>
            </name>
         [3]
        </man>
        </man>
    </people>


<findme >
     [3] secret
</findme>


right
right
/people/man[@id=1] has attributes
/people/man[@id=1]/name hasn't attributes